Page 133 - Computer Science V2.0 Class 11
P. 133
2. To download the desired Python version compatible with the operating system installed on your computer, click
on the appropriate link. The click will initiate the download.
3. Once the Python is downloaded, double-click on the executable file to run the setup. Follow the instructions to
install the software.
5.5 Using the Python IDLE
Once Python is installed on a device, you can begin by using the command line window or the Interactive Development
Learning Environment (IDLE) for Python. It is a simple, integrated learning environment that allows us to create, edit,
run, and debug a Python program interactively.
IDLE has two main window types—the Shell window and the Editor window—giving us two modes to
work–Interactive Mode and Script Mode.
5.5.1 Python Shell
The interactive Python interpreter is also known as the Python Shell.
To start the Python Shell, click on Start-> Python 3.11->IDLE ( Python 3.11 64 bit), as shown in Fig 5.2.
Fig 5.2: Starting the IDLE
By default, the Python Shell opens with a message that includes the Python interpreter version and the
hardware and the operating system associated with the interpreter. It also shows that you can get more
information by invoking the functions help(), copyright(), credits(), and license(). The three
greater-than symbols appearing adjacent to each other (>>>) form the IDLE prompt. A blinking cursor,
following the IDLE prompt, indicates that the IDLE interpreter is ready to accept the commands from the
user.
Version Processor and platform information
Python Prompt
Fig 5.3: Python Shell
Type the command 7+5 and press the Enter key. The interpreter executes the command by evaluating the expression
7+5 and displaying the result (Fig 5.4). As shown in fig 5.5, a short description of the error is displayed in case of an
erroneous command. As Python interpreter provides feedback to the user interactively, we say that it is working in the
interactive mode.
Getng Started with Python Programming 119

