Chapter 0 Python Overview (Python Programming Lecture)

IoT Code Lab
IoT Code LabIoT Code Lab
Chapter 0 Python Overview (Python Programming Lecture)
PYTHON
PROGRAMMING
Chapter 0
Python Overview
Topic
• Python Introduction
• What is Python?
• Story of Python
• Why Python
• Use of Python
• Python Download + Installation
• How to Use? + Online Course
Resource
• First Program - Hello World
• Comment
• Variable + Data Type
• Variable Naming Convention
• Input/ Output
• Type Casting
• Built in Function
PYTHON
PROGRAMMING
Chapter 0
Lecture 0.0
Python Introduction
Python – What is?
• Object Oriented
• High Level
• General Purpose Programming Language
• Interpreted
• Dynamic Semantics
Python – Story
• Created by Guido van Rossum
• The name Python was inspired by the BBC TV show Monty Python's
Flying Circus
• Implementation began in December 1989
• Initial Release (labeled version 0.9.0) => 20 February 1991
• Python 1.0 => January 1994
• Python 2.0 => 16 October 2000
• Python 3.0 => 3 December 2008
Python – Why?
• Easy to learn
• Open source
• One of the most influential programming languages
Python - Use
• Scientific and Numeric analysis
• Web Development
• Desktop GUIs
• Data Science
• Artificial Intelligence
• Machine Learning
• Data Analysis
• Data Visualization
Python – Download
Python – Installation
Python – Installation
Python – Installation Page 2
Python – Installation Page 3
Python – After Installation
Python – Installation – IDE Interface
Python – Installation – IDE Interface
Python – Installation – IDE Interface
Python – Installation – IDE Interface
Python – Installation – IDE Interface
Any Question?
Like, Comment, Share
Subscribe
Chapter 0 Python Overview (Python Programming Lecture)
PYTHON
PROGRAMMING
Chapter 0
Lecture 0.1
Variable, Data Type, Expression
Create First Python Program File
• Python IDLE
• File -> New File -> Save (/Save As) -> Hello.py
• Write Python Program
• Run -> Run Module (/F5)
Write First Python Program
print("Hello World")
Comment
# Single Line Comment
"""
Multi
Line
Comment
"""
First Python Program Modified 1
# First Python Program
# Program Name: Hello World
# Author Name: Mun Al Mamun
# A Program to Print a text
print("Hello World")
First Python Program Modified 2
"""
First Python Program
Program Name: Hello World
Author Name: Mun Al Mamun
A Program to Print a text
"""
print("Hello World")
Variable
• Symbolic name to store date in computer program
Data Type
• Integer => 0, 2, 20038, -332
• Float => 5.5, 3.1416, -40.56
• String => Hello World, This is 2019
• Boolean => True, False
Variable (Integer)
# Integer Variable
my_roll = 50
print(my_roll)
Variable (Integer) + Data Type
# Integer Variable with Data Type
my_roll = 50
print(my_roll)
print(type(my_roll))
Variable (Float) + Data Type
# Float Variable with Data Type
my_gpa = 4.5
print(my_gpa)
print(type(my_gpa))
Variable (String) + Data Type
# String Variable with Data Type
my_name = "My Name is Mun"
print(my_name)
print(type(my_name))
Variable (Boolean) + Data Type
# Boolean Variable with Data Type
test = True
print(test)
print(type(test))
Variable (Boolean) + Data Type [2]
# Boolean Variable with Data Type
test = False
print(test)
print(type(test))
NoneType
# NoneType Variable with Data Type
value = None
print(value)
print(type(value))
Data Type
• str (String)
• int (Integer)
• float (Float)
• bool (Boolean)
• None (NoneType)
Variable Naming Convention
• Must begin with a letter (a - z, A - B) or underscore (_)
• Other characters can be letters, numbers or _
• Variable names are case-sensitive
• Variables should be all lowercase
• Words in a variable name should be separated by an underscore
• Don't start name with a digit.
• Never use special symbols like !, @, #, $, %
• Reserved words cannot be used as a variable
https://visualgit.readthedocs.io/en/latest/pages/naming_convention.html
Practice Problem 0.1
1. Declare a Integer variable and print value with data type
2. Declare a Float variable and print value with data type
3. Declare a String variable and print value with data type
4. Declare a Boolean variable and print value with data type
5. Declare a NoneType variable and print value with data type
Any Question?
Like, Comment, Share
Subscribe
Chapter 0 Python Overview (Python Programming Lecture)
PYTHON
PROGRAMMING
Chapter 0
Lecture 0.2.1
Input Output (String)
Input/Output 1
# input a String
name = input()
print(name)
Input/Output 1 (Con.)[Display Message 1]
#input a String
print("Input Your Name")
name = input()
print(name)
Input/Output 1 (Con.)[Display Message 2]
#input a String
name = input("Input Your Name: ")
print(name)
Input/Output + Data Type
#input a String
name = input("Input Your Name: ")
print(name)
print(type(name))
Input Your Name
# Solution 1:
# input a String and Display the String
name = input()
print(name)
# Solution 2:
# input a String with Message in print()
print("Input Your Name")
name = input()
print(name)
# Solution 3:
# input a String with Message in input()
name = input("Input Your Name: ")
print(name)
# Solution 4:
#input a String and Know Datatype
name = input("Input Your Name: ")
print(name)
print(type(name))
Practice Problem 0.2
1. Input your Name and print the value
2. Input your Name with a massage and print the value
3. Input your Name with a massage in input() function and
print the value
4. Input your Name with a massage in input() function and
print the value with data type
Any Question?
Like, Comment, Share
Subscribe
Chapter 0 Python Overview (Python Programming Lecture)
PYTHON
PROGRAMMING
Chapter 0
Lecture 0.2.2
Input Output (Number)
Input an Integer Number
age = input()
print(age)
Input an Integer Number [Con.][Data Type]
age = input()
print(age)
print(type(age))
• All Input is String in Python
• We have to Type Cast to convert String into Integer.
Input an Integer Number (*)
age = input()
print(age)
print(type(age))
# Type Cast to Integer Number
age = int(age)
print(age)
print(type(age))
Input an Integer Number [Final]
age = int(input())
print(age)
print(type(age))
Input an Float Number
gpa = input()
print(gpa)
print(type(gpa))
Input an Float Number (*)
gpa = input()
print(gpa)
print(type(gpa))
# Type Cast to Float Number
gpa = float(gpa)
print(type(gpa))
print(gpa)
Input an Float Number [Final]
gpa = float(input())
print(gpa)
print(type(gpa))
Built-in Function
• print()
• input()
• type()
• int()
• float()
Built-in Function
source: https://docs.python.org/3.6/library/functions.html
Practice Problem 0.3
1. Input your age and print data with type (Be sure about
type conversion to integer)
2. Input your gpa and print data with type (Be sure about
type conversion to float)
Any Question?
Like, Comment, Share
Subscribe
Chapter 0 Python Overview (Python Programming Lecture)
PYTHON
PROGRAMMING
Chapter 0
Lecture 0.2.3
Formatted Input Output
Formatted I/O
name = input("What is Your Name: ")
print("Hello,", name)
roll = int(input("What is Your Roll: "))
print("Your roll is:", roll)
gpa = float(input("What is Your GPA: "))
print("Your GPA is", gpa)
Formatted I/O 2
name = input("What is Your Name: ")
roll = int(input("What is Your Roll: "))
gpa = float(input("What is Your GPA: "))
print(name,roll,gpa)
Formatted I/O 3
#Input Name with Formatted Output
name = input("What is Your Name: ")
1. print("Hello,",name)
2. print("Hello,", name, "How are You", name, "?")
3. print("Hello,", name, "nHow are You", name, "?")
4. print("Hello, {}nHow are You {}?".format(name,name))
5. print(f"Hello, {name}nHow are You {name}?")
Any Question?
Like, Comment, Share
Subscribe
Chapter 0 Python Overview (Python Programming Lecture)
1 de 69

Recomendados

Python TutorialPython Tutorial
Python TutorialAkramWaseem
1.8K visualizações51 slides
Python basicsPython basics
Python basicsRANAALIMAJEEDRAJPUT
2.5K visualizações37 slides
PYTHON NOTESPYTHON NOTES
PYTHON NOTESNi
11.5K visualizações22 slides
Python basicsPython basics
Python basicsJyoti shukla
470 visualizações37 slides

Mais conteúdo relacionado

Mais procurados

Python PresentationPython Presentation
Python PresentationNarendra Sisodiya
89K visualizações47 slides
Python final pptPython final ppt
Python final pptRipal Ranpara
52.9K visualizações71 slides
Presentation on pythonPresentation on python
Presentation on pythonVenkat Projects
232 visualizações15 slides
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1Haitham El-Ghareeb
3.8K visualizações76 slides
Python WorkshopPython Workshop
Python WorkshopSaket Choudhary
3.6K visualizações43 slides

Mais procurados(20)

Python PresentationPython Presentation
Python Presentation
Narendra Sisodiya89K visualizações
Python final pptPython final ppt
Python final ppt
Ripal Ranpara52.9K visualizações
Presentation on pythonPresentation on python
Presentation on python
Venkat Projects232 visualizações
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
Haitham El-Ghareeb3.8K visualizações
Python WorkshopPython Workshop
Python Workshop
Saket Choudhary3.6K visualizações
Python by RjPython by Rj
Python by Rj
Shree M.L.Kakadiya MCA mahila college, Amreli2K visualizações
Introduction to python programmingIntroduction to python programming
Introduction to python programming
Srinivas Narasegouda2.7K visualizações
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
Kamal Acharya9.8K visualizações
Python Programming LanguagePython Programming Language
Python Programming Language
Dr.YNM 43K visualizações
Python trainingPython training
Python training
Kunalchauhan763.5K visualizações
Python programming introductionPython programming introduction
Python programming introduction
Siddique Ibrahim4.6K visualizações
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
Sumit Satam4.3K visualizações
Python - the basicsPython - the basics
Python - the basics
University of Technology5.1K visualizações
Python - IntroductionPython - Introduction
Python - Introduction
stn_tkiller2.4K visualizações
ProgrammingProgramming
Programming
monishagoyal41.2K visualizações
Introduction to pythonIntroduction to python
Introduction to python
Ayshwarya Baburam1.1K visualizações
Python教程 / Python tutorialPython教程 / Python tutorial
Python教程 / Python tutorial
ee0703639 visualizações
Intro to PythonIntro to Python
Intro to Python
primeteacher323.7K visualizações
Python Programming LanguagePython Programming Language
Python Programming Language
Laxman Puri15.6K visualizações

Similar a Chapter 0 Python Overview (Python Programming Lecture)

What is Python.pdfWhat is Python.pdf
What is Python.pdfPDeepalakshmi1
16 visualizações29 slides
Python basics_ part1Python basics_ part1
Python basics_ part1Elaf A.Saeed
130 visualizações43 slides
Hands on Session on PythonHands on Session on Python
Hands on Session on PythonSumit Raj
2.7K visualizações30 slides

Similar a Chapter 0 Python Overview (Python Programming Lecture)(20)

Lecture 0 python basic (ewurc)Lecture 0 python basic (ewurc)
Lecture 0 python basic (ewurc)
Al-Mamun Riyadh (Mun)305 visualizações
What is Python.pdfWhat is Python.pdf
What is Python.pdf
PDeepalakshmi116 visualizações
Python basics_ part1Python basics_ part1
Python basics_ part1
Elaf A.Saeed130 visualizações
Python programming workshop session 1Python programming workshop session 1
Python programming workshop session 1
Abdul Haseeb177 visualizações
Hands on Session on PythonHands on Session on Python
Hands on Session on Python
Sumit Raj2.7K visualizações
Lecture1_introduction to python.pptxLecture1_introduction to python.pptx
Lecture1_introduction to python.pptx
MohammedAlYemeni18 visualizações
INTRODUCTION TO PYTHON.pptxINTRODUCTION TO PYTHON.pptx
INTRODUCTION TO PYTHON.pptx
Nimrahafzal1120 visualizações
modul-python-part1.pptxmodul-python-part1.pptx
modul-python-part1.pptx
Yusuf Ayuba62 visualizações
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
Gnanesh1223 visualizações
python_class.pptxpython_class.pptx
python_class.pptx
chandankumar9438686 visualizações
Python (3).pdfPython (3).pdf
Python (3).pdf
samiwaris223 visualizações
Python Basics by Akanksha BaliPython Basics by Akanksha Bali
Python Basics by Akanksha Bali
Akanksha Bali275 visualizações
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1
Kirti Verma588 visualizações
#Code2Create: Python Basics#Code2Create: Python Basics
#Code2Create: Python Basics
GDGKuwaitGoogleDevel192 visualizações
Python fundamentalsPython fundamentals
Python fundamentals
natnaelmamuye92 visualizações
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutes
Sumit Raj1.4K visualizações
PythonPython
Python
Gagandeep Nanda704 visualizações
Fundamentals of pythonFundamentals of python
Fundamentals of python
BijuAugustian79 visualizações

Mais de IoT Code Lab

7.1 html lec 77.1 html lec 7
7.1 html lec 7IoT Code Lab
80 visualizações15 slides
6.1 html lec 66.1 html lec 6
6.1 html lec 6IoT Code Lab
54 visualizações16 slides
5.1 html lec 55.1 html lec 5
5.1 html lec 5IoT Code Lab
49 visualizações47 slides
4.1 html lec 44.1 html lec 4
4.1 html lec 4IoT Code Lab
57 visualizações32 slides

Mais de IoT Code Lab(10)

7.1 html lec 77.1 html lec 7
7.1 html lec 7
IoT Code Lab80 visualizações
6.1 html lec 66.1 html lec 6
6.1 html lec 6
IoT Code Lab54 visualizações
5.1 html lec 55.1 html lec 5
5.1 html lec 5
IoT Code Lab49 visualizações
4.1 html lec 44.1 html lec 4
4.1 html lec 4
IoT Code Lab57 visualizações
3.1 html lec 33.1 html lec 3
3.1 html lec 3
IoT Code Lab50 visualizações
2.1 html lec 22.1 html lec 2
2.1 html lec 2
IoT Code Lab37 visualizações
1.1 html lec 11.1 html lec 1
1.1 html lec 1
IoT Code Lab68 visualizações
1.0 intro1.0 intro
1.0 intro
IoT Code Lab85 visualizações

Último(20)

Lecture: Open InnovationLecture: Open Innovation
Lecture: Open Innovation
Michal Hron94 visualizações
Class 10 English  lesson plansClass 10 English  lesson plans
Class 10 English lesson plans
TARIQ KHAN189 visualizações
Ch. 7 Political Participation and Elections.pptxCh. 7 Political Participation and Elections.pptx
Ch. 7 Political Participation and Elections.pptx
Rommel Regala56 visualizações
231112 (WR) v1  ChatGPT OEB 2023.pdf231112 (WR) v1  ChatGPT OEB 2023.pdf
231112 (WR) v1 ChatGPT OEB 2023.pdf
WilfredRubens.com118 visualizações
American Psychological Association  7th Edition.pptxAmerican Psychological Association  7th Edition.pptx
American Psychological Association 7th Edition.pptx
SamiullahAfridi460 visualizações
Student Voice Student Voice
Student Voice
Pooky Knightsmith125 visualizações
GSoC 2024GSoC 2024
GSoC 2024
DeveloperStudentClub1056 visualizações
Narration lesson plan.docxNarration lesson plan.docx
Narration lesson plan.docx
TARIQ KHAN92 visualizações
Education and Diversity.pptxEducation and Diversity.pptx
Education and Diversity.pptx
DrHafizKosar87 visualizações
DU Oral Examination Toni SantamariaDU Oral Examination Toni Santamaria
DU Oral Examination Toni Santamaria
MIPLM128 visualizações
NS3 Unit 2 Life processes of animals.pptxNS3 Unit 2 Life processes of animals.pptx
NS3 Unit 2 Life processes of animals.pptx
manuelaromero201394 visualizações
BYSC infopack.pdfBYSC infopack.pdf
BYSC infopack.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego160 visualizações
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov74 visualizações
Material del tarjetero LEES Travesías.docxMaterial del tarjetero LEES Travesías.docx
Material del tarjetero LEES Travesías.docx
Norberto Millán Muñoz60 visualizações
Chemistry of sex hormones.pptxChemistry of sex hormones.pptx
Chemistry of sex hormones.pptx
RAJ K. MAURYA107 visualizações

Chapter 0 Python Overview (Python Programming Lecture)