2025
AIM POINT INFOSYSTEM PVT. LTD.
Python Basics (I)
Why Programming languages:
To provide interaction between human and computer .
To perform any task very fastly.
Language compiler covert source code(high level ) to machine code(low level)
There are around more than 800 programming languages
FORTAN is the first high level programming language
“C” is developed in 1972 to interact with computer H/W ( to implement system
S/W as well as for device drivers ) .
“C++” is Object Oriented Programming language ( in 1979 )
First OOP language is SIMULA-67
PYTHON is a general purpose programming language, it is a combination of
Procedure oriented and Object oriented programming language.
Computer Language: it’s a way of communication between user and computer.
Computer Language:- it’s a way of communication between user and computer.
There are three categories of computer language
Low Level Language: It’s a computer language , through which we can directly interact
with hardware , and it does not require complier because though low level lang. we
direct access registers. It is tough in learning due to its complex syntaxes, and its use to
implement assembly programming or system software.
Example : assembly lang. and machine lang.( 1 ,0 )
Middle Level Language: In middle level computer lang. we can make the programming
of both levels , Low Level as well as High Level .
Example : C and C++
High Level: In High Level programming language , we always write programs in
ENGLISH , so it require compiler to convert High Level Lang . to Low Level ( Machine )
Lang . It is easy in learning due to its easy syntaxes and used to implement application
software
Example : BASIC , Cobol , Pascal , Fortran , Java , PL/SQL , Python ….etc
Python Fundamentals / History
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 1
2025
AIM POINT INFOSYSTEM PVT. LTD.
Python is a general purpose high level programming language.
Python was developed by Guido Van Rossam in 1989 while working at
National Research Institute (NRI) at Netherlands.
But officially Python was made available to public in 1991. The official Date of Birth
for Python is : Feb 20th 1991.
From python 2.1 version onwards python is managed by PYTHON
SOFTWARE FOUNDATION ( PSF ) Delaware USA
Python is recommended as first programming language for beginners.
The name Python was selected from the TV Show
"The Complete Monty Python's Circus"
Python language by taking almost all programming features from different
languages
1. Functional Programming Features from C
2. Object Oriented Programming Features from C++
3. Scripting Language Features from Perl and Shell Script
4. Modular Programming Features from Modula-3
5. Most of syntax in Python Derived from C and ABC languages.
6. ABC programming language is said to be the predecessor of Python
language which was capable of Exception Handling
Where we can use Python (domain where we can use python):
We can use everywhere. The most common important application areas are
1. For developing Desktop Applications ( Using Library PyQT and Tkinter )
2. For developing web Applications
( using frame works Django , Pyramid , Flask )
3. For developing database Applications
4. For Network Programming
5. For developing games ( Using library PyGame )
6. For Data Analysis Applications ( Using Library NumPy , Pandas )
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 2
2025
AIM POINT INFOSYSTEM PVT. LTD.
7. For Machine Learning , developing Artificial Intelligence Applications
( face reorganization , audio file reorganization , etc )
( using library Tensorflow , SciKit Learn )
8. For IOT ( RaspBerry Py – like small computer or to control any
electronic equipment or controlling Car functionalities etc )
IOT means Internet Of things
Most Popular S/W Developed In Python
Google , NetFlix , InstaGram , YouTube , DropBox , PayPal , Quora ,FaceBook ,
Games , Audio S/W etc
Python uses by following companies:
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 3
2025
AIM POINT INFOSYSTEM PVT. LTD.
#WAP to display any Message in Java / “C” / Python
Java
Class MyMsg
{ public static void main(String a[] )
{
System.out.println(“ Hello India “);
}
}
“C”
#include<stdio.h>
void main( )
{ printf(“ Hello India “);
}
“Python”
>>>print(“Hello India”)
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 4
2025
AIM POINT INFOSYSTEM PVT. LTD.
#WAP to add two nos in Java / “C” / Python
Java
class AddNos
{
public static void main( String a[ ] )
{ int a , b ;
a = 25 ;
b = 30 ;
System.out.println( “sum = “ + ( a+b) );
}
}
“C”
#include<stdio.h>
void main( )
{ int a , b ;
a = 25 ;
b = 30 ;
printf( “\n sum = %d “ , a+b );
}
Python
>>>a=25
>>>b=30
>>>print(“sum=”, (a+b) )
#WAP to swapping two nos in Java / “C” / Python
Java
class SwapNos
{
public static void main( String a[ ] )
{ int a = 25 , b = 10 ,c ;
c=a;
a =b;
b =c;
System.out.println( “ After Swapping = “ + a + “ “ + b );
}
}
“C”
#include<stdio.h>
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 5
2025
AIM POINT INFOSYSTEM PVT. LTD.
void main( )
{ int a = 25, b =10 , c;
c=a;
a =b;
b =c;
printf( “ After Swapping = % %d “ , a , b );
}
Python
>>>a=25
>>>b=10
>>> a , b = b , a
// the value of ‘b’ assign in ‘a’ and the value of ‘a’ assign in ‘b’
>>> a
10
>>> b
25
Python Features
1. Python is a simple programming language:
When we read Python program, we can feel like reading English statements. The
syntaxes are very simple and only around 33 keywords are available. When compared
with other languages, we can write programs with very less number of lines. Hence
more readability and simplicity. We can reduce development and cost of the project.
2. Freeware and Open Source:
We can use Python software without any licence and it is freeware.Its source code is
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 6
2025
AIM POINT INFOSYSTEM PVT. LTD.
open, so that we can we can customize based on our requirement.
Eg: Jython is customized version of Python to work with Java Applications.
3. High Level Programming language:
Python is high level programming language and hence it is programmer friendly
language. Being a programmer we are not required to concentrate low level activities
like memory management and security etc..
4. Platform Independent:
Once we write a Python program,it can run on any platform without rewriting once
again. Internally PVM is responsible to convert into machine understandable form.
5. Portability:
Python programs are portable. ie we can migrate from one platform to another platform
very easily. Python programs will provide same results on any platform.
6 .Dynamically Typed:
In Python we are not required to declare type for variables. Whenever we are assigning
the value, based on value, type will be allocated automatically. Hence Python is
considered as dynamically typed language.
But Java, C etc are Statically Typed Languages b'z we have to provide type at the
beginning only.
This dynamic typing nature will provide more flexibility to the programmer.
7.Both Procedure Oriented and Object Oriented:
Python language supports both Procedure oriented (like C, pascal etc) and object
oriented (like C++,Java) features. Hence we can get benefits of both like security and
reusability etc
8. Interpreted:
We are not required to compile Python programs explicitly. Internally Python interpreter
will take care that compilation.
If compilation fails interpreter raised syntax errors. Once compilation success then PVM
(Python Virtual Machine) is responsible to execute.
9. Extensible:
We can use other language programs in Python. The main advantages of this approach
are:
1. We can use already existing legacy non-Python code
2. We can improve performance of the application
10. Embedded:
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 7
2025
AIM POINT INFOSYSTEM PVT. LTD.
We can use Python programs in any other language programs. i.e we can embedded
Python programs anywhere.
11. Extensive Library:
Python has a rich inbuilt library. Being a programmer we can use this library directly and
we are not responsible to implement the functionality.
Flavors of Python (Implementations of Python)
1. CPython:
It is the standard flavor of Python. It can be used to work with C lanugage Applications
2. Jython or JPython:
It is for Java Applications. It can run on JVM
3. IronPython:
It is for C#.Net platform
4. PyPy:
The main advantage of PyPy is performance will be improved because JIT ( Just In
Time ) compiler is available inside PVM.
5. RubyPython
For Ruby Platforms
6. AnacondaPython
It is specially designed for handling large volume of data processing.
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 8
2025
AIM POINT INFOSYSTEM PVT. LTD.
Python Versions:
Python 1.0V introduced in Jan 1994
Python 2.0V introduced in October 2000
Python 3.0V introduced in December 2008
Python 2.7V introduced in December 2010
Python 3.6V introduced in Dec 2016
Python 3.7V introduced in Jun 2018 ( for 32 bit only ) / 3.5.8 in Oct 2019
Python 3.8V/3.8.5V introduced in july 2020
Latest Version Of Python 3.14.0 ( 7 Oct 2025 )
Some Assumptions About Python Implementations and Python version:
around 20+ implementations are going on in S/W industry.
CPython is the faster Compiler ( if we not consider PyPy ).
PyPy is the most faster compiler is all Python implementations due to its JIT
compiler .
Python 3 won't provide backward compatibility to Python2.
i.e there is no guarantee that Python2 programs will run in Python3.
Python 2.7V introduced after Python3.0.
Now as per PSF Python 2.x is legacy , and Python 3.x will be future of python
Steps To Install Python For Windows:
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 9
2025
AIM POINT INFOSYSTEM PVT. LTD.
Go to Google
Type python download for windows
Click on Python.org
Click on Download python 3.8.5
It will be download python 3.8.5 Exe
Open Python 3.8.5 Exe
Click on Install Now ( Run as administration )
Click On Customize Installation
Click on Next
Activate the Checkbox Add Python to Environment variables
Click on Install ( Exit )
Python IDE :
NotePad , PyCham , Spyder , Visual Studio etc
: Interpreter vs Compiler:
Interpreter Compiler
1. It will check line by line and 1. It will check Whole program at
executes a time
2. It gives the result line by line 2. It gives whole output at a time
3. If any error occurs interpreter stops 3.It Checks all statements in
Hence it shows only one error the program and show all
errors in program
4. It will not generate executable file 4. If no errors in the program
then it generates executable file
5. It always executes only source 5. It executes exe
code
file Ex : C,C+
Ex: Html ,Perl ,Javascript ,Python
+,C#,Java
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 10
2025
AIM POINT INFOSYSTEM PVT. LTD.
FACULTY : SANDEEP SAHU( M.Tech(CSE)) Page 11