Informatics Practices
Class XI ( As per CBSE Board)
Chapter 4 Getting Started With python
New syllabus 2020-21
Visit : python.mykvs.in for regular updates
Python Introduction
It is widely used general purpose,high level programming language.Developed by Guido van Rossum in 1991.
It is used for:
software development,
web development (server-side), system scripting,
Mathematics.
Visit : python.mykvs.in for regular updates
Features of Python
Visit : python.mykvs.in for regular updates
Shortcomings of Python
Visit : python.mykvs.in for regular updates
Installing Python
Visit : python.mykvs.in for regular updates
Two Steps Only –
Installing Python
Visit : python.mykvs.in for regular updates
1. Download Python distribution
You can download python distribution from the link given below https://www.python.org/downloads/
Note – Download only that python distribution/MSI Installer, which is best suited for
the Operating system on which you want to install it.
Installing Python
Visit : python.mykvs.in for regular updates
2. Python installation process
1. Double-click the icon labeling the file <version>.exe Popup window will appear
Click on Run option
Installing Python
2. Setup popup window will appear
If the Python Installer finds an earlier version of Python installed on your computer, the Install Now message will instead appear as Upgrade Now(and the checkboxes will not appear).
Highlight the IVnistital:l pNyotwho(no.rmUypkgvsra.idnefoNrorweg)umlaersusapgdea,taens d then click it
Installing Python
Visit : python.mykvs.in for regular updates
3. User Account Conrol pop-up window will appear
Click the Yes button.
Installing Python
Visit : python.mykvs.in for regular updates
4. A new Python <version> Setup pop-up window will appear
with a Setup Progress message and a progress bar.
Installing Python
Visit : python.mykvs.in for regular updates
5. Soon, a new Python <version> Setup pop-up window will appear with a Setup was successfully message
Click the close button
How to work in Python
Visit : python.mykvs.in for regular updates
After installation of python ,we can work on it in following ways
How to work in Python
Visit : python.mykvs.in for regular updates
(i) in Interactive mode
* Search the python.exe file in the drive in which it is installed.
If found double click it to start python in interactive
mode
How to work in Python
Visit : python.mykvs.in for regular updates
* Click start button -> All programs -> python<version>->IDLE(Python GUI)
How to work in Python
Visit : python.mykvs.in for regular updates
Python command prompt >>>
Type the following at prompt
print “hello”
print 8*3 print 3**3 k=3+4*3
print k
How to work in Python
Visit : python.mykvs.in for regular updates
(ii) in Script mode
Step 1 (Create program file)
Below steps are for simple hello world program
Python<version>->IDLE
print “hello” print “world”
print “python is”,”object oriented programming lang.”
How to work in Python
Visit : python.mykvs.in for regular updates
(ii) in Script mode
Step 2 (Run program file)
output in separate python shell window
Note :- Python comes in 2 flavours – python 2.x and python 3.x . Later one is Backward incompatible language as decide by Python Software foundation(PSF). Mean code written in 2.x will not execute on 3.x . Visit the below link for difference between 2.x & 3.x
https://www.geeksforgeeks.org/important-differences-
between-python-2-x-and-python-3-x-with-examples/