SlideShare a Scribd company logo
2
Most read
19
Most read
22
Most read
Introduction to Python
Why do people use Python?
• Software Quality:
Python is designed to be readable, and hence maintainable.
• Developer productivity:
Python code is typically 1/3 to 1/5 the size of equivalent C++ or JAVA
code
What can I do with Python?
• System Programming
• GUIs
• Internet Scripting
• Database Programming
• Games, Images, AI, XML and more
What are Python’s Technical Strength
• It’s OO
• It’s free
• It’s Portable
• It’s Powerful
• It’s Easy to use
• It’s Easy to learn
What is the Downside of Python?
• Perhaps the only downside to Python is that the execution speed
may not always as fast as compiled languages such as C and C++
• Python is not compiled all the way down to binary machine code, it
compiled to byte code instead.
Who Uses Python Today?
• Google and Yahoo currently use Python in Internet service
• IBM use Python for hardware testing
• Industrial Light and Magic use Python in the production of movie
animation
• For more details, visit www.python.org
Install Python
• Go to http://www.python.org/download/releases/3.2/ and
download Python3.2, then select Windows x86 MSI Installer
(3.2) or Windows X86-64 MSI Installer (3.2)
Install Python
• Or you can search for Python, choose “Download” and then
select Python 3.2 Windows x86 MSI Installer or Python 3.2
Windows X86-64 MSI Installer
Hello World Program
• Implement by three different languages
• In C
• In JAVA
• In Python
“Hello World” in C
main()
{
printf("hello, worldn");
}
“Hello World” in JAVA
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
“Hello World” in Python
print (“Hello World!!”)
Be familiar with Python
>>> print ("Hello, World! ")
Hello, World!
>>> 10 + 25
35
>>> 124 – 125
-1
>>> 1/3
0.333333333333333
• Python command print – Displays data, values, and expressions
• The single and double quotation mark string objects, which are
collections of texts surrounded by quotes.
Some Python commands
Be familiar with Python
>>> print ("Hello, World! ")
Hello, World!
>>> "hello"
'hello'
>>> "world"
'world'
>>> "hello"+"world"
'helloworld'
Be familiar with Python
>>> "hello" * 3
'hellohellohello'
>>> "hello" * 300
>>> width = 20
>>> height = 45
>>> area = width * height
>>> area
900
Declare a variable and assign its
value Example: Area of a
rectangle
>>> a=3
>>> b=4
>>> a+1
>>> b*3
>>> b/3
>>> b/3.0
>>> b**2
>>> 2+4.0
>>> 2.0**b
What are the outputs? Why?
How do you run programs?
Three different methods:
• 1. Interactive Coding
• 2. Files (such as NotePad, WordPad)
• 3. Integrated Development Environment (IDE)
Create and run a program in the
Python IDLE
• From File -> New Window
• Type your program
print ("Hello, World! ")
• Save your program
(Give a name you like, such as test.py)
• Run the program
(by selecting the Run Module or pressing the F5 key)
Your first Python program- hello.py
# This program says hello and asks for my name.
hello = 'Hello world! '
print(hello)
print('What is your name?')
myName = input()
print('It is good to meet you, ' + myName)
hello.py executed sequentially
# This program says hello and asks for my name.
Any text following a # sign is a comment. Comments are not
for the computer, but for you, the programmer.
1.hello = 'Hello world! ' # assign the string to a name
2.print(hello) # call the print( ) function
3.print('What is your name?') # call the print( ) function
4.myName = input() # call the input( ) function
5.print('It is good to meet you, ' + myName)

More Related Content

PPT
Intro to Python
PPTX
Phython Programming Language
PPTX
Python presentation by Monu Sharma
PPTX
Python basics
PPTX
PYTHON FEATURES.pptx
PDF
Python programming
PPTX
Introduction python
Intro to Python
Phython Programming Language
Python presentation by Monu Sharma
Python basics
PYTHON FEATURES.pptx
Python programming
Introduction python

What's hot (20)

PPTX
Python Seminar PPT
PPTX
Python - An Introduction
PDF
Introduction to python programming
PPTX
Introduction to-python
PPTX
Python PPT
PDF
Introduction to python
PPTX
Introduction to the basics of Python programming (part 1)
PDF
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
PDF
Python final ppt
PDF
Overview of python 2019
PPTX
Introduction to python
PPTX
Presentation on python
PPTX
Introduction to python
PPTX
Benefits & features of python |Advantages & disadvantages of python
PPT
Python Programming Language
PPTX
PPT
Introduction to Python
PPT
Introduction to Python
PPT
Python ppt
Python Seminar PPT
Python - An Introduction
Introduction to python programming
Introduction to-python
Python PPT
Introduction to python
Introduction to the basics of Python programming (part 1)
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
Python final ppt
Overview of python 2019
Introduction to python
Presentation on python
Introduction to python
Benefits & features of python |Advantages & disadvantages of python
Python Programming Language
Introduction to Python
Introduction to Python
Python ppt
Ad

Viewers also liked (8)

PPTX
Introduction to Python
PDF
Ambidextrous Python - Introduction Python Libraries
PDF
Python - An Introduction
ODP
Python Ireland Feb '11 Talks: Introduction to Python
PDF
Introduction to Python for Data Science
PPTX
Introduction to Python programming
PPTX
Python Programming Language
PPTX
Introduction about Python by JanBask Training
Introduction to Python
Ambidextrous Python - Introduction Python Libraries
Python - An Introduction
Python Ireland Feb '11 Talks: Introduction to Python
Introduction to Python for Data Science
Introduction to Python programming
Python Programming Language
Introduction about Python by JanBask Training
Ad

Similar to Introduction to python (20)

PPTX
PYTHON PROGRAMMING.pptx
PDF
Fundamentals of python
PPTX
Introduction to Python Programming .pptx
PPT
Introduction to python
PDF
05 python.pdf
PPT
1B-Introduction_to_python.ppt
PDF
PYTHON PROGRAMMING NOTES RKREDDY.pdf
PDF
Python programming msc(cs)
PDF
Unit 1-Part-1-Introduction to Python.pdf
PDF
Introduction to python 3
PPTX
Introduction to python.pptx
PDF
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
PDF
Introduction to Python Unit -1 Part .pdf
PPTX
python presntation 2.pptx
PDF
Lecture01 - Fundamental Programming with Python Language
PDF
Python Programing Bio computing,basic concepts lab,,
PDF
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
PDF
python-handbook.pdf
PDF
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
PPT
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
PYTHON PROGRAMMING.pptx
Fundamentals of python
Introduction to Python Programming .pptx
Introduction to python
05 python.pdf
1B-Introduction_to_python.ppt
PYTHON PROGRAMMING NOTES RKREDDY.pdf
Python programming msc(cs)
Unit 1-Part-1-Introduction to Python.pdf
Introduction to python 3
Introduction to python.pptx
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Introduction to Python Unit -1 Part .pdf
python presntation 2.pptx
Lecture01 - Fundamental Programming with Python Language
Python Programing Bio computing,basic concepts lab,,
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
python-handbook.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
notwa dfdfvs gf fdgfgh s thgfgh frg reggg

More from Syed Zaid Irshad (20)

PDF
Data Structures & Algorithms - Spring 2025.pdf
PDF
Operating System.pdf
PDF
DBMS_Lab_Manual_&_Solution
PPTX
Data Structure and Algorithms.pptx
PPTX
Design and Analysis of Algorithms.pptx
PPTX
Professional Issues in Computing
PDF
Reduce course notes class xi
PDF
Reduce course notes class xii
PDF
Introduction to Database
PDF
C Language
PDF
Flowchart
PDF
Algorithm Pseudo
PDF
Computer Programming
PDF
ICS 2nd Year Book Introduction
PDF
Security, Copyright and the Law
PDF
Computer Architecture
PDF
Data Communication
PDF
Information Networks
PDF
Basic Concept of Information Technology
PDF
Introduction to ICS 1st Year Book
Data Structures & Algorithms - Spring 2025.pdf
Operating System.pdf
DBMS_Lab_Manual_&_Solution
Data Structure and Algorithms.pptx
Design and Analysis of Algorithms.pptx
Professional Issues in Computing
Reduce course notes class xi
Reduce course notes class xii
Introduction to Database
C Language
Flowchart
Algorithm Pseudo
Computer Programming
ICS 2nd Year Book Introduction
Security, Copyright and the Law
Computer Architecture
Data Communication
Information Networks
Basic Concept of Information Technology
Introduction to ICS 1st Year Book

Recently uploaded (20)

PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
AgentX UiPath Community Webinar series - Delhi
PDF
ETO & MEO Certificate of Competency Questions and Answers
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
436813905-LNG-Process-Overview-Short.pptx
PPTX
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
PDF
Geotechnical Engineering, Soil mechanics- Soil Testing.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
“Next-Gen AI: Trends Reshaping Our World”
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PPT
Chapter 6 Design in software Engineeing.ppt
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
AgentX UiPath Community Webinar series - Delhi
ETO & MEO Certificate of Competency Questions and Answers
Operating System & Kernel Study Guide-1 - converted.pdf
436813905-LNG-Process-Overview-Short.pptx
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
Geotechnical Engineering, Soil mechanics- Soil Testing.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Arduino robotics embedded978-1-4302-3184-4.pdf
“Next-Gen AI: Trends Reshaping Our World”
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Chapter 6 Design in software Engineeing.ppt
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf

Introduction to python

  • 2. Why do people use Python? • Software Quality: Python is designed to be readable, and hence maintainable. • Developer productivity: Python code is typically 1/3 to 1/5 the size of equivalent C++ or JAVA code
  • 3. What can I do with Python? • System Programming • GUIs • Internet Scripting • Database Programming • Games, Images, AI, XML and more
  • 4. What are Python’s Technical Strength • It’s OO • It’s free • It’s Portable • It’s Powerful • It’s Easy to use • It’s Easy to learn
  • 5. What is the Downside of Python? • Perhaps the only downside to Python is that the execution speed may not always as fast as compiled languages such as C and C++ • Python is not compiled all the way down to binary machine code, it compiled to byte code instead.
  • 6. Who Uses Python Today? • Google and Yahoo currently use Python in Internet service • IBM use Python for hardware testing • Industrial Light and Magic use Python in the production of movie animation • For more details, visit www.python.org
  • 7. Install Python • Go to http://www.python.org/download/releases/3.2/ and download Python3.2, then select Windows x86 MSI Installer (3.2) or Windows X86-64 MSI Installer (3.2)
  • 8. Install Python • Or you can search for Python, choose “Download” and then select Python 3.2 Windows x86 MSI Installer or Python 3.2 Windows X86-64 MSI Installer
  • 9. Hello World Program • Implement by three different languages • In C • In JAVA • In Python
  • 10. “Hello World” in C main() { printf("hello, worldn"); }
  • 11. “Hello World” in JAVA class myfirstjavaprog { public static void main(String args[]) { System.out.println("Hello World!"); } }
  • 12. “Hello World” in Python print (“Hello World!!”)
  • 13. Be familiar with Python >>> print ("Hello, World! ") Hello, World! >>> 10 + 25 35 >>> 124 – 125 -1 >>> 1/3 0.333333333333333
  • 14. • Python command print – Displays data, values, and expressions • The single and double quotation mark string objects, which are collections of texts surrounded by quotes. Some Python commands
  • 15. Be familiar with Python >>> print ("Hello, World! ") Hello, World! >>> "hello" 'hello' >>> "world" 'world' >>> "hello"+"world" 'helloworld'
  • 16. Be familiar with Python >>> "hello" * 3 'hellohellohello' >>> "hello" * 300
  • 17. >>> width = 20 >>> height = 45 >>> area = width * height >>> area 900 Declare a variable and assign its value Example: Area of a rectangle
  • 18. >>> a=3 >>> b=4 >>> a+1 >>> b*3 >>> b/3 >>> b/3.0 >>> b**2 >>> 2+4.0 >>> 2.0**b What are the outputs? Why?
  • 19. How do you run programs? Three different methods: • 1. Interactive Coding • 2. Files (such as NotePad, WordPad) • 3. Integrated Development Environment (IDE)
  • 20. Create and run a program in the Python IDLE • From File -> New Window • Type your program print ("Hello, World! ") • Save your program (Give a name you like, such as test.py) • Run the program (by selecting the Run Module or pressing the F5 key)
  • 21. Your first Python program- hello.py # This program says hello and asks for my name. hello = 'Hello world! ' print(hello) print('What is your name?') myName = input() print('It is good to meet you, ' + myName)
  • 22. hello.py executed sequentially # This program says hello and asks for my name. Any text following a # sign is a comment. Comments are not for the computer, but for you, the programmer. 1.hello = 'Hello world! ' # assign the string to a name 2.print(hello) # call the print( ) function 3.print('What is your name?') # call the print( ) function 4.myName = input() # call the input( ) function 5.print('It is good to meet you, ' + myName)