python programming tutorial basics compiler download

Python programming, Python tutorial, basics of python, Python compiler, download, learn python. 

Python is a high level language, Python interpreter is required to installed in our computer to write and run Python code. 

If you wish to download and install python on your PC Laptop then just click here and choose latest version as per our OS platform. 

Python is also considered as an interpreted language because Python programs are executed by an interpreter. Python shell can be used in two ways, such as  interactive mode and script mode.

Interactive Mode : As the name suggests, it allows us to interact with Operating System.  

when we type Python statement, interpreter displays the results immediately. 

That means, when we type Python expression / statement / command after the prompt (>>>), the Python immediately responses with the output of it. 

Let's see what will happen when we type print "HELLO PYTHON PROGRAM"
after the prompt.


Another example 

>>> print 10+15
>>> x=15
>>> y=10
>>> print x*y 

Script Mode: In script mode, when we type Python program in a file and then use interpreter to execute the content of the file. 

Working in interactive mode is convenient for beginners and for testing small pieces of
code, as one can test them immediately. 

But for coding of more than few lines, we should always save our code so that it can be modified and reused.

Note :- Python, in interactive mode, is good enough to learn, experiment or explore, but its only drawback is that we cannot save the statements and have to retype all the statements once again to re-run them.

Script Mode code example :- 

a = input ("Enter first number")
b = input ("Enter second number")
print "Quotient", a/b
print "Remainder", a%b

Output: (Interactive Mode)

Enter first number10
Enter second number3

Quotient 3
Remainder 1


Previous Post
Next Post
Related Posts