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.
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
- IDLE Etc..
- Netbeans Etc..
We can write our python programs any one of the above Editors/IDEs.
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
Happy Learning 🙂