SlideShare a Scribd company logo
4
Most read
6
Most read
10
Most read
Lecture - 1
Training On Python
Introduction To Python
• Python is powerful and general purpose programming language, developed by the Guido Van Rossum
(1989).
• Guido Van Rossum developed python language at mathematical research institute called ‘CWI’.
• CWI is located at Netherland.
• Guido developed python language by taking the different language features like:-
Procedure oriented programming language--C
Object oriented programming language--C++, Java
Scripting language-- Shell script, perl.
Modular programming language--Modula – 3
Note:- Guido Van Rossum made available python language to the public in 1991.
Applications Developed By Using Python
 Web Development.
 Machine Learning & Artificial Intelligence.
 Data Science & Data Visualization
 Desktop GUI
 Game Development
 Web Scrapping Applications
 Business Applications
 Embedded Applications
 IOT (Internet Of Things)
Difference Between Programming And Scripting Languages
Scripting Language Programming Language
Scripting language are interpreter based languages. Programming language are compiler based
languages.
Scripting language programs (or) applications
explicit compilation is not required.
It requires explicit compilation.
Scripting language programs (or) applications
directly we can run.
Programming language programs (or) applications
we can’t run without compilation.
Scripting language programs (or) applications take
larger time to execute.
Programming language programs (or) applications
take less time to execute.
Ex. Shell script, perl… Ex. C, C++, Java,…..
Features Of Python
1. Simple And Easy To Learn
The syntaxes of the python language are very simple.
Anybody can remember the python language syntaxes, rules and regulations very easily.
By developing the python programs (or) applications programmers need not to focus on the syntaxes.
Instead of focusing on syntaxes they can focus on the business logic implementation.
The elegant syntaxes of the python language make the people to learn python in easiest manner.
Without having any other programming language knowledge directly anybody can learn python
language.
The simple and powerful syntax of the python language makes the programmers to express their
business logic is less lines of code.
Because of simple feature of python language project development cost, development time and
maintenance cost will become less.
2. Platform Independent
The Python applications which are developed on one platform are going to execute on irrespective of
platforms without making any changes in the python applications.
To achieve the portability feature with respect to every o.s. seperate python software is developed for
every version of python.
3. Free, Open Source And Re-distribution
Anybody can use the python software without purchasing license agreement of python.
Anybody can read the python source code and they can do the modifications in the python source code
and we can redistribute that code to others.
4. Supporting Procedural And Object Oriented Programming
Python language supports both p.o.p and o.o.p language features.
If we develop any application according to the oops principles then that application will get security,
flexibility & reusability.
Different oops principles are:
i.) Encapsulation
ii.) Polymorphism
iii.) Inheritance
iv.) Abstraction
Python supports oops principles because of that reason python applications will get the security,
flexibility and reusability.
5. Interpreted Language
Python applications don’t require explicit compilation so that compiler is not required for in python
software.
Directly we can run the python applications without compiling explicit.
Python interpreter is responsible for execution of python applications.
Whenever we run python applications python interpreter will check the syntax error. If no syntax error
python interpreter converts that code in the form of intermediate code in the form of low level format
and executes it.
The intermediate code of python applications is known as byte code.
The extension for the byte code file is .pyc.
6. Extensible
Python application execution is slower compared to c, c++ programs execution.
To overcome the above problem we can implement some logics by using c, c++ language and we can
use c, c++ programs into python application.
Python source code doesn’t contain security i.e., anybody can read python code and they can do the
modifications in the source code.
If we want to provide security to the some part (logic) or some algorithm of python application then
we represent that code on logic (or) algorithm by using c (or) c++ languages and we use that code into
python application.
7. Embeddable
We can use the python code into the other language programs such as c, c++, java ..
In order to provide the scripting capabilities to other language programs / applications we use python
code into those applications.
8.Rich In Built-in Libraries
Python language is providing huge built – in libraries.
Python developers can use built-in libraries in their applications.
By using built-in libraries application development will become faster.
Third party people developed libraries, modules we can add to python software and used into python
applications.
Installation Of Python Interpreter
Download the required python 3.7.0 software from following website:
http://www.python.org/downloads
Click on the downloaded installer file and install it.
Development Of Python Applications (or) Programs
We can develop python applications / programs in two modes. They are
Interactive mode
Batch mode
Interactive Mode
Interactive mode is a command line shell.
In command line shell if we write any python statement immediately that statement will execute and
gives the result.
Interactive mode is used to test the features of the python (what python can do?)
Note:- Interactive mode is not used for development of business applications.
Batch Mode
In batch mode we write group of python statements in any one of the editors (or) IDE’s.
After writing the group of python statements in anyone of the editor / IDE we save the file with extension “.py” or
“.pyw”.
After developing the .py (or) .pyw files we submit those files to the python interpreter directly.
Batch mode is used for development of business application.
Write the following code:-
i=1000
j=200
print(i+j)
print (i-j)
Save the above file with demo.py in c-drive.
Open the cmd prompt
C:>python demo.py
Input & Output In Python
In python we use print() method to display output.
E.g.
print(“Hello, World”)
print(“Summation=”,(10+2))
In python we use input() method to take input from user. By default input() method take string type
input.
But if you need another type of input you must typecast it.
E.g.
name=input(“Enter your name : ”) #String input
a=int(input(“Enter first no : ”)) #int input
Example Application
#WAP in python to make a simple calculator
a=int(input(“Enter first no : ”))
b=int(input(“Enter second no : ”))
print(“Summation=”,(a+b))
print(“Subtraction=”,(a-b))
print(“Multiplication=”,(a*b))
print(“Division=”,(a/b))
O/P:-
Enter first no : 10
Enter second no : 5
Summation=15
Subtraction=5
Multiplication=50
Division=2

More Related Content

PPTX
PYTHON TUTORIALS.pptx
PPT
1-ppt-python.ppt
PPTX
Introduction to Python Programming Basics
PPTX
Why Python in required in Civil Engineering
PPT
Python for students step by step guidance
PPTX
Introduction to python
PDF
Python Programming Part 1.pdf
PDF
Python Programming Part 1.pdf
PYTHON TUTORIALS.pptx
1-ppt-python.ppt
Introduction to Python Programming Basics
Why Python in required in Civil Engineering
Python for students step by step guidance
Introduction to python
Python Programming Part 1.pdf
Python Programming Part 1.pdf

Similar to university notes Lecture - 1 (Python) E-Notes.pptx (20)

PPTX
Python.pptx
PPTX
Chapter - 1.pptx
PPTX
Python
PPTX
Chapter 2: Basics of programming pyton programming
DOCX
Seminar report on python 3 course
DOCX
Seminar report On Python
PDF
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
PPTX
Phython Programming Language
PPTX
python unit2.pptx
PPTX
python programminig and introduction.pptx
DOCX
Python Programming and ApplicationsUnit-1.docx
PPTX
introduction to python in detail including .pptx
PPTX
Python Class 1
PPTX
POWER OF PYTHON PROGRAMMING LANGUAGE
PDF
Python programming for beginners
PPTX
What is python
PDF
COMPUTER 8 Grade 8 - Intro to Python.pdf
PPTX
Python - An Introduction
PPTX
637b4894085c4_ppt.pptx
PPT
Python_basics_tuples_sets_lists_control_loops.ppt
Python.pptx
Chapter - 1.pptx
Python
Chapter 2: Basics of programming pyton programming
Seminar report on python 3 course
Seminar report On Python
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Phython Programming Language
python unit2.pptx
python programminig and introduction.pptx
Python Programming and ApplicationsUnit-1.docx
introduction to python in detail including .pptx
Python Class 1
POWER OF PYTHON PROGRAMMING LANGUAGE
Python programming for beginners
What is python
COMPUTER 8 Grade 8 - Intro to Python.pdf
Python - An Introduction
637b4894085c4_ppt.pptx
Python_basics_tuples_sets_lists_control_loops.ppt
Ad

Recently uploaded (20)

PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
UNIT 4 Total Quality Management .pptx
PPT
Mechanical Engineering MATERIALS Selection
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Artificial Intelligence
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPT
introduction to datamining and warehousing
PPTX
Sustainable Sites - Green Building Construction
DOCX
573137875-Attendance-Management-System-original
PPTX
Current and future trends in Computer Vision.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPT
Project quality management in manufacturing
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Construction Project Organization Group 2.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Safety Seminar civil to be ensured for safe working.
CYBER-CRIMES AND SECURITY A guide to understanding
UNIT 4 Total Quality Management .pptx
Mechanical Engineering MATERIALS Selection
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Artificial Intelligence
Fundamentals of safety and accident prevention -final (1).pptx
introduction to datamining and warehousing
Sustainable Sites - Green Building Construction
573137875-Attendance-Management-System-original
Current and future trends in Computer Vision.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
Project quality management in manufacturing
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
III.4.1.2_The_Space_Environment.p pdffdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Construction Project Organization Group 2.pptx
Ad

university notes Lecture - 1 (Python) E-Notes.pptx

  • 2. Introduction To Python • Python is powerful and general purpose programming language, developed by the Guido Van Rossum (1989). • Guido Van Rossum developed python language at mathematical research institute called ‘CWI’. • CWI is located at Netherland. • Guido developed python language by taking the different language features like:- Procedure oriented programming language--C Object oriented programming language--C++, Java Scripting language-- Shell script, perl. Modular programming language--Modula – 3 Note:- Guido Van Rossum made available python language to the public in 1991.
  • 3. Applications Developed By Using Python  Web Development.  Machine Learning & Artificial Intelligence.  Data Science & Data Visualization  Desktop GUI  Game Development  Web Scrapping Applications  Business Applications  Embedded Applications  IOT (Internet Of Things)
  • 4. Difference Between Programming And Scripting Languages Scripting Language Programming Language Scripting language are interpreter based languages. Programming language are compiler based languages. Scripting language programs (or) applications explicit compilation is not required. It requires explicit compilation. Scripting language programs (or) applications directly we can run. Programming language programs (or) applications we can’t run without compilation. Scripting language programs (or) applications take larger time to execute. Programming language programs (or) applications take less time to execute. Ex. Shell script, perl… Ex. C, C++, Java,…..
  • 6. 1. Simple And Easy To Learn The syntaxes of the python language are very simple. Anybody can remember the python language syntaxes, rules and regulations very easily. By developing the python programs (or) applications programmers need not to focus on the syntaxes. Instead of focusing on syntaxes they can focus on the business logic implementation. The elegant syntaxes of the python language make the people to learn python in easiest manner. Without having any other programming language knowledge directly anybody can learn python language. The simple and powerful syntax of the python language makes the programmers to express their business logic is less lines of code. Because of simple feature of python language project development cost, development time and maintenance cost will become less.
  • 7. 2. Platform Independent The Python applications which are developed on one platform are going to execute on irrespective of platforms without making any changes in the python applications. To achieve the portability feature with respect to every o.s. seperate python software is developed for every version of python.
  • 8. 3. Free, Open Source And Re-distribution Anybody can use the python software without purchasing license agreement of python. Anybody can read the python source code and they can do the modifications in the python source code and we can redistribute that code to others.
  • 9. 4. Supporting Procedural And Object Oriented Programming Python language supports both p.o.p and o.o.p language features. If we develop any application according to the oops principles then that application will get security, flexibility & reusability. Different oops principles are: i.) Encapsulation ii.) Polymorphism iii.) Inheritance iv.) Abstraction Python supports oops principles because of that reason python applications will get the security, flexibility and reusability.
  • 10. 5. Interpreted Language Python applications don’t require explicit compilation so that compiler is not required for in python software. Directly we can run the python applications without compiling explicit. Python interpreter is responsible for execution of python applications. Whenever we run python applications python interpreter will check the syntax error. If no syntax error python interpreter converts that code in the form of intermediate code in the form of low level format and executes it. The intermediate code of python applications is known as byte code. The extension for the byte code file is .pyc.
  • 11. 6. Extensible Python application execution is slower compared to c, c++ programs execution. To overcome the above problem we can implement some logics by using c, c++ language and we can use c, c++ programs into python application. Python source code doesn’t contain security i.e., anybody can read python code and they can do the modifications in the source code. If we want to provide security to the some part (logic) or some algorithm of python application then we represent that code on logic (or) algorithm by using c (or) c++ languages and we use that code into python application.
  • 12. 7. Embeddable We can use the python code into the other language programs such as c, c++, java .. In order to provide the scripting capabilities to other language programs / applications we use python code into those applications.
  • 13. 8.Rich In Built-in Libraries Python language is providing huge built – in libraries. Python developers can use built-in libraries in their applications. By using built-in libraries application development will become faster. Third party people developed libraries, modules we can add to python software and used into python applications.
  • 14. Installation Of Python Interpreter Download the required python 3.7.0 software from following website: http://www.python.org/downloads Click on the downloaded installer file and install it.
  • 15. Development Of Python Applications (or) Programs We can develop python applications / programs in two modes. They are Interactive mode Batch mode
  • 16. Interactive Mode Interactive mode is a command line shell. In command line shell if we write any python statement immediately that statement will execute and gives the result. Interactive mode is used to test the features of the python (what python can do?) Note:- Interactive mode is not used for development of business applications.
  • 17. Batch Mode In batch mode we write group of python statements in any one of the editors (or) IDE’s. After writing the group of python statements in anyone of the editor / IDE we save the file with extension “.py” or “.pyw”. After developing the .py (or) .pyw files we submit those files to the python interpreter directly. Batch mode is used for development of business application. Write the following code:- i=1000 j=200 print(i+j) print (i-j) Save the above file with demo.py in c-drive. Open the cmd prompt C:>python demo.py
  • 18. Input & Output In Python In python we use print() method to display output. E.g. print(“Hello, World”) print(“Summation=”,(10+2)) In python we use input() method to take input from user. By default input() method take string type input. But if you need another type of input you must typecast it. E.g. name=input(“Enter your name : ”) #String input a=int(input(“Enter first no : ”)) #int input
  • 19. Example Application #WAP in python to make a simple calculator a=int(input(“Enter first no : ”)) b=int(input(“Enter second no : ”)) print(“Summation=”,(a+b)) print(“Subtraction=”,(a-b)) print(“Multiplication=”,(a*b)) print(“Division=”,(a/b)) O/P:- Enter first no : 10 Enter second no : 5 Summation=15 Subtraction=5 Multiplication=50 Division=2