際際滷

際際滷Share a Scribd company logo
Unit-1: (i) Introduction to Python Programming
(ii) Conditional Statements, Looping, Control Statements
(i) Introduction to Python Programming
History of Python
 Python is a widely used general-purpose, high-level programming language.
 It was initially designed by Guido Van Rossum in 1991 and developed by Python
Software Foundation.
 It was started firstly as a hobby project because he was looking for an interesting
project to keep him occupied during Christmas.
 When discussing the history of Python, its impossible to overlook the influence of
the ABC programming language, which influenced the design and development of
Python.
 Van Rossum worked as an implementer of the ABC programming language at CWI
(Centrum Voor Wiskunde en Informatica) at Netherlands in the early 1980s.
 It was mainly developed for emphasis on code readability, and its syntax allows
programmers to express concepts in fewer lines of code.
 The inspiration for the name came from BBCs TV Show  Monty Pythons Flying
Circus, as he was a big fan of the TV show and also he wanted a short, unique and
slightly mysterious name for his invention and hence he named it Python!
 Python 3.0 was released on December 3rd, 2008.
 Latest version of python is Python 3.10.2.
 Python Software Foundation (PSF) used to support two major versions, Python 2.x &
Python 3.x.
 PSF supported Python 2 because a large body of existing code could not be forward
ported to Python 3. So, they supported Python 2 until January 2020, but now they
have stopped supporting it.
Features of Python
 Easy to Learn and Use
Python is easy to learn as compared to other programming languages.
The Python language is designed to make developers life easy.
Its syntax is straightforward and much the same as the English language.
 Free and Open Source
Python language is freely available at its official website.
You can download it from the link: https://www.python.org/downloads/
 Object-Oriented Language
Python supports object-oriented language and concepts of classes, objects
encapsulation, etc.
 Interpreted Language
Python is an interpreted language; it means the Python program is executed one
line at a time. The advantage of being interpreted language, it makes debugging
easy and portable.
 Cross-platform Language
Python can run equally on different platforms such as Windows, Mac OS, Linux,
UNIX, and Macintosh, etc. So, we can say that Python is a portable language.
 Dynamically Typed Language
Python is a dynamically typed language. That means the type (for example- int,
double, long, etc.) for a variable is decided at run time not in advance because of
this feature we dont need to specify the type of variable.
 Large Standard Library
It provides a vast range of libraries for the various fields such as machine learning,
web development, also for the scripting. There are various machine learning
libraries, such as Tensor flow, Pandas, Numpy, Keras, and Pytorch, etc.
Installation of Anaconda
Step-1: Search download anaconda individual edition in Google.
Step-2: Click on the first link.
Step-3: Click on download (if your Operating System (OS) is Windows).
Note: If your OS is MacOS then click on the apple logo. If your OS is Linux then click on Linux logo.
Further steps may be different for these Operating Systems.
Step-4: Locate the download file and double click on it.
Step-5: Click on Run
Step-6: Click on Next
Step-7: Click on I Agree
Step-8: Click on Next.
Step-9: Click on Next.
Step-10: Click on Install.
Step-11: Click on Next.
Step-12: Click on Next.
Step-13: Click on Finish
Hey! You just installed Anaconda.
Open Anaconda
To open Anaconda click on start menu and search anaconda then click on Anaconda Navigator (anaconda3). Wait till
it opens.
Restart your computer if you face problem to open anaconda navigator then try to open again.
You will see the following window when it opens.
You can open Jupyter Notebook and Spyder by just clicking on Launch.
Jupyter Notebook
After Launching Jupyter Notebook, a new window will open in Internet explorer.
Open Documents folder.
Open Python Scripts folder. We will create our Jupyter Notebook files in Python Scripts folder.
Create a new Jupyter Notebook by clicking on New and selecting Python 3 (ipykernel).
A new tab will open.
This is Jupyter Notebook file.
S
To change the title of the file first click on untitled, then edit the name and click on rename.
Google Colab
Colab is a free Jupyter notebook environment that runs entirely in the cloud.
To open it, search Google colab in Google then click on the first link.
Intro to Python Programming
Intro to Python Programming

More Related Content

Similar to Intro to Python Programming (20)

Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Nikhil Kapoor
chapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptxchapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptx
Jahnavi113937
PYTHON TUTORIALS.pptx
PYTHON TUTORIALS.pptxPYTHON TUTORIALS.pptx
PYTHON TUTORIALS.pptx
EzatIlman1
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
VaibhavKumarSinghkal
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
AnirudhaGaikwad4
1-ppt-python.ppt
1-ppt-python.ppt1-ppt-python.ppt
1-ppt-python.ppt
ssusera99a83
python intro and installation.pptx
python intro and installation.pptxpython intro and installation.pptx
python intro and installation.pptx
adityakumawat625
Python for students step by step guidance
Python for students step by step guidancePython for students step by step guidance
Python for students step by step guidance
MantoshKumar79
Introduction to python for dummies
Introduction to python for dummiesIntroduction to python for dummies
Introduction to python for dummies
Lalit Jain
Exploratory Analytics in Python provided by EY.pdf
Exploratory Analytics in Python provided by EY.pdfExploratory Analytics in Python provided by EY.pdf
Exploratory Analytics in Python provided by EY.pdf
totondak
Introduction to Python.pptx
Introduction to Python.pptxIntroduction to Python.pptx
Introduction to Python.pptx
SamyakJain461
Getting started with python
Getting started with pythonGetting started with python
Getting started with python
TechieHours
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
priyanshupanchal8
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
SudhanshiBakre1
UNIT - I FIRST PRESENTATION - Copy networking in python.pptx
UNIT - I FIRST PRESENTATION - Copy networking in python.pptxUNIT - I FIRST PRESENTATION - Copy networking in python.pptx
UNIT - I FIRST PRESENTATION - Copy networking in python.pptx
gargojas31
Python basics
Python basicsPython basics
Python basics
ssuser4e32df
Features of Python.pdf
Features of Python.pdfFeatures of Python.pdf
Features of Python.pdf
SudhanshiBakre1
11 Unit1 Chapter 1 Getting Started With Python
11   Unit1 Chapter 1 Getting Started With Python11   Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With Python
Praveen M Jigajinni
Seminar report On Python
Seminar report On PythonSeminar report On Python
Seminar report On Python
Shivam Gupta
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
YadavHarshKr
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Nikhil Kapoor
chapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptxchapter-1-eng-getting-started-with-python.pptx
chapter-1-eng-getting-started-with-python.pptx
Jahnavi113937
PYTHON TUTORIALS.pptx
PYTHON TUTORIALS.pptxPYTHON TUTORIALS.pptx
PYTHON TUTORIALS.pptx
EzatIlman1
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
VaibhavKumarSinghkal
1-ppt-python.ppt
1-ppt-python.ppt1-ppt-python.ppt
1-ppt-python.ppt
ssusera99a83
python intro and installation.pptx
python intro and installation.pptxpython intro and installation.pptx
python intro and installation.pptx
adityakumawat625
Python for students step by step guidance
Python for students step by step guidancePython for students step by step guidance
Python for students step by step guidance
MantoshKumar79
Introduction to python for dummies
Introduction to python for dummiesIntroduction to python for dummies
Introduction to python for dummies
Lalit Jain
Exploratory Analytics in Python provided by EY.pdf
Exploratory Analytics in Python provided by EY.pdfExploratory Analytics in Python provided by EY.pdf
Exploratory Analytics in Python provided by EY.pdf
totondak
Introduction to Python.pptx
Introduction to Python.pptxIntroduction to Python.pptx
Introduction to Python.pptx
SamyakJain461
Getting started with python
Getting started with pythonGetting started with python
Getting started with python
TechieHours
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
SudhanshiBakre1
UNIT - I FIRST PRESENTATION - Copy networking in python.pptx
UNIT - I FIRST PRESENTATION - Copy networking in python.pptxUNIT - I FIRST PRESENTATION - Copy networking in python.pptx
UNIT - I FIRST PRESENTATION - Copy networking in python.pptx
gargojas31
Features of Python.pdf
Features of Python.pdfFeatures of Python.pdf
Features of Python.pdf
SudhanshiBakre1
11 Unit1 Chapter 1 Getting Started With Python
11   Unit1 Chapter 1 Getting Started With Python11   Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With Python
Praveen M Jigajinni
Seminar report On Python
Seminar report On PythonSeminar report On Python
Seminar report On Python
Shivam Gupta
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
YadavHarshKr

Recently uploaded (20)

Industrial Valves, Instruments Products Profile
Industrial Valves, Instruments Products ProfileIndustrial Valves, Instruments Products Profile
Industrial Valves, Instruments Products Profile
zebcoeng
CFOT Fiber Optics FOA CERTIFICATION.pptx
CFOT Fiber Optics FOA CERTIFICATION.pptxCFOT Fiber Optics FOA CERTIFICATION.pptx
CFOT Fiber Optics FOA CERTIFICATION.pptx
MohamedShabana37
Multi objective genetic approach with Ranking
Multi objective genetic approach with RankingMulti objective genetic approach with Ranking
Multi objective genetic approach with Ranking
namisha18
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
NgocThang9
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptxRAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
JenTeruel1
Equipment for Gas Metal Arc Welding Process
Equipment for Gas Metal Arc Welding ProcessEquipment for Gas Metal Arc Welding Process
Equipment for Gas Metal Arc Welding Process
AhmadKamil87
Water Industry Process Automation & Control Monthly - March 2025.pdf
Water Industry Process Automation & Control Monthly - March 2025.pdfWater Industry Process Automation & Control Monthly - March 2025.pdf
Water Industry Process Automation & Control Monthly - March 2025.pdf
Water Industry Process Automation & Control
The Golden Gate Bridge a structural marvel inspired by mother nature.pptx
The Golden Gate Bridge a structural marvel inspired by mother nature.pptxThe Golden Gate Bridge a structural marvel inspired by mother nature.pptx
The Golden Gate Bridge a structural marvel inspired by mother nature.pptx
AkankshaRawat75
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
J. Agricultural Machinery
Cloud Computing concepts and technologies
Cloud Computing concepts and technologiesCloud Computing concepts and technologies
Cloud Computing concepts and technologies
ssuser4c9444
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
slayshadow705
Introduction to Safety, Health & Environment
Introduction to Safety, Health  & EnvironmentIntroduction to Safety, Health  & Environment
Introduction to Safety, Health & Environment
ssuserc606c7
CS3451-OPERATING-SYSTEM NOTES ALL123.pdf
CS3451-OPERATING-SYSTEM NOTES ALL123.pdfCS3451-OPERATING-SYSTEM NOTES ALL123.pdf
CS3451-OPERATING-SYSTEM NOTES ALL123.pdf
PonniS7
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
Turbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdfTurbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdf
Totok Sulistiyanto
Cyber Security_ Protecting the Digital World.pptx
Cyber Security_ Protecting the Digital World.pptxCyber Security_ Protecting the Digital World.pptx
Cyber Security_ Protecting the Digital World.pptx
Harshith A S
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Daniel Donatelli
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
sreenath seenu
Lecture -3 Cold water supply system.pptx
Lecture -3 Cold water supply system.pptxLecture -3 Cold water supply system.pptx
Lecture -3 Cold water supply system.pptx
rabiaatif2
Engineering at Lovely Professional University (LPU).pdf
Engineering at Lovely Professional University (LPU).pdfEngineering at Lovely Professional University (LPU).pdf
Engineering at Lovely Professional University (LPU).pdf
Sona
Industrial Valves, Instruments Products Profile
Industrial Valves, Instruments Products ProfileIndustrial Valves, Instruments Products Profile
Industrial Valves, Instruments Products Profile
zebcoeng
CFOT Fiber Optics FOA CERTIFICATION.pptx
CFOT Fiber Optics FOA CERTIFICATION.pptxCFOT Fiber Optics FOA CERTIFICATION.pptx
CFOT Fiber Optics FOA CERTIFICATION.pptx
MohamedShabana37
Multi objective genetic approach with Ranking
Multi objective genetic approach with RankingMulti objective genetic approach with Ranking
Multi objective genetic approach with Ranking
namisha18
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
NgocThang9
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptxRAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
JenTeruel1
Equipment for Gas Metal Arc Welding Process
Equipment for Gas Metal Arc Welding ProcessEquipment for Gas Metal Arc Welding Process
Equipment for Gas Metal Arc Welding Process
AhmadKamil87
The Golden Gate Bridge a structural marvel inspired by mother nature.pptx
The Golden Gate Bridge a structural marvel inspired by mother nature.pptxThe Golden Gate Bridge a structural marvel inspired by mother nature.pptx
The Golden Gate Bridge a structural marvel inspired by mother nature.pptx
AkankshaRawat75
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
J. Agricultural Machinery
Cloud Computing concepts and technologies
Cloud Computing concepts and technologiesCloud Computing concepts and technologies
Cloud Computing concepts and technologies
ssuser4c9444
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
slayshadow705
Introduction to Safety, Health & Environment
Introduction to Safety, Health  & EnvironmentIntroduction to Safety, Health  & Environment
Introduction to Safety, Health & Environment
ssuserc606c7
CS3451-OPERATING-SYSTEM NOTES ALL123.pdf
CS3451-OPERATING-SYSTEM NOTES ALL123.pdfCS3451-OPERATING-SYSTEM NOTES ALL123.pdf
CS3451-OPERATING-SYSTEM NOTES ALL123.pdf
PonniS7
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
Turbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdfTurbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdf
Totok Sulistiyanto
Cyber Security_ Protecting the Digital World.pptx
Cyber Security_ Protecting the Digital World.pptxCyber Security_ Protecting the Digital World.pptx
Cyber Security_ Protecting the Digital World.pptx
Harshith A S
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Daniel Donatelli
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
sreenath seenu
Lecture -3 Cold water supply system.pptx
Lecture -3 Cold water supply system.pptxLecture -3 Cold water supply system.pptx
Lecture -3 Cold water supply system.pptx
rabiaatif2
Engineering at Lovely Professional University (LPU).pdf
Engineering at Lovely Professional University (LPU).pdfEngineering at Lovely Professional University (LPU).pdf
Engineering at Lovely Professional University (LPU).pdf
Sona

Intro to Python Programming

  • 1. Unit-1: (i) Introduction to Python Programming (ii) Conditional Statements, Looping, Control Statements (i) Introduction to Python Programming History of Python Python is a widely used general-purpose, high-level programming language. It was initially designed by Guido Van Rossum in 1991 and developed by Python Software Foundation. It was started firstly as a hobby project because he was looking for an interesting project to keep him occupied during Christmas.
  • 2. When discussing the history of Python, its impossible to overlook the influence of the ABC programming language, which influenced the design and development of Python. Van Rossum worked as an implementer of the ABC programming language at CWI (Centrum Voor Wiskunde en Informatica) at Netherlands in the early 1980s. It was mainly developed for emphasis on code readability, and its syntax allows programmers to express concepts in fewer lines of code. The inspiration for the name came from BBCs TV Show Monty Pythons Flying Circus, as he was a big fan of the TV show and also he wanted a short, unique and slightly mysterious name for his invention and hence he named it Python! Python 3.0 was released on December 3rd, 2008. Latest version of python is Python 3.10.2.
  • 3. Python Software Foundation (PSF) used to support two major versions, Python 2.x & Python 3.x. PSF supported Python 2 because a large body of existing code could not be forward ported to Python 3. So, they supported Python 2 until January 2020, but now they have stopped supporting it.
  • 4. Features of Python Easy to Learn and Use Python is easy to learn as compared to other programming languages. The Python language is designed to make developers life easy. Its syntax is straightforward and much the same as the English language. Free and Open Source Python language is freely available at its official website. You can download it from the link: https://www.python.org/downloads/ Object-Oriented Language Python supports object-oriented language and concepts of classes, objects encapsulation, etc.
  • 5. Interpreted Language Python is an interpreted language; it means the Python program is executed one line at a time. The advantage of being interpreted language, it makes debugging easy and portable. Cross-platform Language Python can run equally on different platforms such as Windows, Mac OS, Linux, UNIX, and Macintosh, etc. So, we can say that Python is a portable language. Dynamically Typed Language Python is a dynamically typed language. That means the type (for example- int, double, long, etc.) for a variable is decided at run time not in advance because of this feature we dont need to specify the type of variable.
  • 6. Large Standard Library It provides a vast range of libraries for the various fields such as machine learning, web development, also for the scripting. There are various machine learning libraries, such as Tensor flow, Pandas, Numpy, Keras, and Pytorch, etc.
  • 7. Installation of Anaconda Step-1: Search download anaconda individual edition in Google.
  • 8. Step-2: Click on the first link. Step-3: Click on download (if your Operating System (OS) is Windows). Note: If your OS is MacOS then click on the apple logo. If your OS is Linux then click on Linux logo. Further steps may be different for these Operating Systems.
  • 9. Step-4: Locate the download file and double click on it. Step-5: Click on Run
  • 11. Step-7: Click on I Agree
  • 14. Step-10: Click on Install.
  • 17. Step-13: Click on Finish Hey! You just installed Anaconda.
  • 18. Open Anaconda To open Anaconda click on start menu and search anaconda then click on Anaconda Navigator (anaconda3). Wait till it opens. Restart your computer if you face problem to open anaconda navigator then try to open again.
  • 19. You will see the following window when it opens. You can open Jupyter Notebook and Spyder by just clicking on Launch.
  • 20. Jupyter Notebook After Launching Jupyter Notebook, a new window will open in Internet explorer. Open Documents folder.
  • 21. Open Python Scripts folder. We will create our Jupyter Notebook files in Python Scripts folder.
  • 22. Create a new Jupyter Notebook by clicking on New and selecting Python 3 (ipykernel). A new tab will open.
  • 23. This is Jupyter Notebook file.
  • 24. S
  • 25. To change the title of the file first click on untitled, then edit the name and click on rename.
  • 26. Google Colab Colab is a free Jupyter notebook environment that runs entirely in the cloud. To open it, search Google colab in Google then click on the first link.