In this article, we are going to install IDLE Python (The official IDE for python) on Windows. For more information about Python, see this.
1. Click here to download installer for windows
2. Run the installer program you downloaded. In the first screen that appears, click Install Now.
2. The setup will start automatically. If the computer asks for administrative privileges, click YES to grant.
3. After the setup is complete, click close.
Launching the IDE:
To launch the IDE, go to Start>All Programs>Python and open IDLE python as shown.
Modes in IDE:
There are two modes for writing the code:
1. Immediate Mode:
Soon after opening the IDE, you are in the immediate mode. You can start coding. The results will be displayed right after you click enter.
Let’s write a basic program to display Hello World on the screen. Type this in the IDE and press enter:
You can start writing a bit longer code as well. Take the following code to compute and display the sum of 32 and 43
*Note that we did’nt use quotation marks in above statement.
To display multiple things in the print statement, separate them by comma (,)
2. Script Mode:
To open the script mode, click File>New File or just press Ctrl+N
In the new screen that appears, you can write your code.
Before being able to see the output of your code, you will have to save your code on hard disk. Python programs are saved as *.py files. To save your code, select File>Save or just press Ctrl+S. Select a location on the disk and save your work.
To see the output of your code, click Run>Run Module
You will see the output of your code in another screen.