Monday , September 25 2017
Home / Python / Modes of Python Program

Modes of Python Program

In this tutorials, we are going to learn about how many ways to develop the python program/application

Modes of Python Program :

We can develop python program in 2 different modes.

  • Interactive Mode and
  • Batch Mode.

Interactive Mode :

Interactive mode is a command line shell. If we write a python program in command line shell, the statements executed immediately and gives the output.

typically the interactive mode is used to test the features of the python, or to run a smaller scripts that may not be reusable.

Example for Interactive Mode :

Open the command prompt, and go to the location which your python has been installed and pass the command python.

Python Program

On the above example I have executed some arithmetic operations on python command shell.

Batch Mode :

Batch mode is mainly used to develop the business applications. In batch mode we can write a group of python statements in any one of the following editors or IDEs

Editors :

  • Notepad
  • Notepad++
  • editPlus
  • nano
  • gedit
  • IDLE   Etc..

IDEs :

  • pycharm
  • Eric
  • Eclipse
  • Netbeans   Etc..

We can write our python programs any one of the above Editors/IDEs.

Example :

demo.py


i=100
j=200
print i+j
print i-j
print i*j

After writing the above code on your any favourite editor save it with extension of either .py or .pyw.

Then run the above python program by passing the below command on your terminal.

chandrashekhar@goka:~/Documents$ python demo.py
300
-100
20000

Happy Learning 🙂

About chandrashekhar

Hi Folks, you have reach this so far, that shows you like what you are learning. Then why don't you support us to improve for bettor tutorials by leaving your valuable comments and why not you keep in touch with us for latest updates on your favorite blog @ facebook , twitter , Or Google+ ,

Recommended

Python raw_input read input from keyboard

In this tutorials I am going to show you how to read input from keyboard …

Leave a Reply

Your email address will not be published. Required fields are marked *