Python Function

python tutorial

What are functions? Functions are a convenient way to divide your code into useful blocks, allowing us to order our code, make it more readable, reuse it and save some time. Functions are a key way to define interfaces so programmers can share their code. Function is a block of organized, reusable code that is … Read more

Python Comment : Comment in Python

python tutorial

As programs get bigger and more complicated, they get more difficult to read. Formal languages are dense, and it is often difficult to look at a piece of code and figure out what it is doing, or why. For this reason, it is a good idea to add notes to your programs to explain in … Read more

python : If else example

python tutorial

Decision making is anticipation of conditions occurring while execution of the program and specifying actions taken according to the conditions. Decision structures evaluate multiple expressions which produce TRUE or FALSE as outcome. You need to determine which action to take and which statements to execute if outcome is TRUE or FALSE otherwise. Lets have an … Read more

Python Identity Operators Example

identity operator python

There are used to compare the memory locations of two operators. Example: #!/usr/bin/python a = 20 b = 20 if ( a is b ): print “Line 1 – a and b have same identity” else: print “Line 1 – a and b do not have same identity” if ( id(a) == id(b) ): print … Read more

Python : Installation on Windows and Simple Example

python tutorial

What is python? Python is an interpreted programming language. As it is a programming language so it tells a computer what to do. However, the computer doesn’t read the language directly – there are hundreds of programming languages, and it couldn’t understand them all. So, when someone writes a program, they will write it in … Read more