Xi Ip
Xi Ip
Xi Ip
Python is an interpreted, high level programming language designed to be easy to read and simple to
implement. It is an open source, which means it is free to use. It was created by Guido Van Rossum and
released in 1991.
Advantage of Python:
a) Easy to use
b) Expressive language
c) Interpreted Language
d) Its Completeness
e) Cross platform independent
f) Free and open source
g) Variety of Usage/Application
Disadvantage of Python:
Working in Python:
Before you start working in Python, you need to install Python on your computer. There are multiple
Python distributions available today. Default installation available from www.python.org
Click Python Download. The following page will appear in your browser.
Click the Windows link (two lines below the Download Python 3.7.4 button). The following
page will appear in your browser.
Click on the Download Windows x86-64 executable installer link under the top-left Stable
Releases. The following pop-up window titled Opening python-3.74-amd64.exe will appear.
2. Move this file to a more permanent location, so that you can install Python (and reinstall
it easily later, if necessary).
3. Feel free to explore this webpage further; if you want to just continue the installation, you
can terminate the tab browsing this webpage.
4. Start the Installing instructions directly below.
Installing
1. Ensure that the Install launcher for all users (recommended) and the Add Python 3.7
to PATH checkboxes at the bottom are checked.
If the Python Installer finds an earlier version of Python installed on your computer,
the Install Now message may instead appear as Upgrade Now (and the checkboxes will
not appear).
2. Highlight the Install Now (or Upgrade Now) message, and then click it.
When run, a User Account Control pop-up window may appear on your screen. I could
not capture its image, but it asks, Do you want to allow this app to make changes to
your device.
A new Python 3.7.4 (64-bit) Setup pop-up window will appear with a Setup
Progress message and a progress bar.
During installation, it will show the various components it is installing and move the progress bar
towards completion. Soon, a new Python 3.7.4 (64-bit) Setup pop-up window will appear with
a Setup was successfuly message.
Goto start and Click on IDLE (Python 3.7 64-bit) and you can see the installed software.
Once you have installed Python on your computer, you are ready to work on it. You can work in
Python in following different ways:
Interactive Mode: In interactive mode, one command can run at a time and commands are not saved.
Script mode: All the commands are in the form of a program file and can see output of all lines together.
Let us create our first program – a simple: ”Hello World”. (We are using Python IDE for this.
Open the program from the start and select IDLE (Python 3.7 64-bit)
Click on File – New File and write the code
print(“Hello World”)
Save the file as first.py (.py is the extension of python) and run by pressing F5 key and you will get the
output as below.
Name="Anurag Singh"
print("My name is", Name)
A=10
B=12
C= A+B
print(C)