SlideShare a Scribd company logo
Programming
Translator
Machine Code
(Compiler / Interpreter)
Apna College
What is Python?
Python is simple & easy
Free & Open Source
High Level Language
Developed by Guido van Rossum
Portable Apna College
Our First Program
print("Hello World")
Apna College
Python Character Set
Letters – A to Z, a to z
Digits – 0 to 9
Special Symbols - + - * / etc.
Whitespaces – Blank Space, tab, carriage return, newline, formfeed
Other characters – Python can process all ASCII and Unicode characters as part of data or literals
Apna College
Variables
name = "Shradha"
age = 23
price = 25.99
A variable is a name given to a memory location in a program.
Apna College
Memory
name = "Shradha"
age = 23
price = 25.99
Apna College
Rules for Identifiers
Apna College
Data Types
Integers
String
Float
Boolean
None
Apna College
Data Types
Apna College
Keywords
Keywords are reserved words in python.
*False should be uppercase
Apna College
Print Sum
Apna College
# Single Line Comment
"""
Multi Line
Comment
"""
Comments in Python
Apna College
Arithmetic Operators ( + , - , * , / , % , ** )
Relational / Comparison Operators ( == , != , > , < , >= , <= )
Assignment Operators ( = , +=, -= , *= , /= , %= , **= )
Logical Operators ( not , and , or )
Types of Operators
An operator is a symbol that performs a certain operation between operands.
Apna College
Type Conversion
a, b = 1, 2.0
sum = a + b
a, b = 1, "2"
sum = a + b
#error
Apna College
Type Casting
a, b = 1, "2"
c = int(b)
sum = a + c
Apna College
Type Casting
Apna College
int ( input( ) ) #int
Input in Python
input( ) #result for input( ) is always a str
float ( input( ) ) #float
give code eg of all 3
input( ) statement is used to accept values (using keyboard) from user
Apna College
Let‘s Practice
Write a Program to input 2 numbers & print their sum.
Apna College
Let‘s Practice
WAP to input side of a square & print its area.
Apna College
Let‘s Practice
WAP to input 2 floating point numbers & print their average.
Apna College
Let‘s Practice
WAP to input 2 int numbers, a and b.
Print True if a is greater than or equal to b. If not print False.
Apna College

More Related Content

More from ahmedendrise81

外围买球-外围买球网站-外围买球|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
外围买球-外围买球网站-外围买球|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台外围买球-外围买球网站-外围买球|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
外围买球-外围买球网站-外围买球|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
ahmedendrise81
 
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
ahmedendrise81
 
2024欧洲杯押注在哪个app-2024欧洲杯押注在哪个app欢迎您-2024欧洲杯押注在哪个app|【​网址​🎉ac123.net🎉​】
2024欧洲杯押注在哪个app-2024欧洲杯押注在哪个app欢迎您-2024欧洲杯押注在哪个app|【​网址​🎉ac123.net🎉​】2024欧洲杯押注在哪个app-2024欧洲杯押注在哪个app欢迎您-2024欧洲杯押注在哪个app|【​网址​🎉ac123.net🎉​】
2024欧洲杯押注在哪个app-2024欧洲杯押注在哪个app欢迎您-2024欧洲杯押注在哪个app|【​网址​🎉ac123.net🎉​】
ahmedendrise81
 
欧洲杯买球网好的网站-欧洲杯买球网好的网站网址-欧洲杯买球网好的网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球网好的网站-欧洲杯买球网好的网站网址-欧洲杯买球网好的网站|【​网址​🎉ac123.net🎉​】欧洲杯买球网好的网站-欧洲杯买球网好的网站网址-欧洲杯买球网好的网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球网好的网站-欧洲杯买球网好的网站网址-欧洲杯买球网好的网站|【​网址​🎉ac123.net🎉​】
ahmedendrise81
 
欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
ahmedendrise81
 
2024欧洲杯竞猜app-推荐2024欧洲杯竞猜app大全|立即访问【ac123.net】
2024欧洲杯竞猜app-推荐2024欧洲杯竞猜app大全|立即访问【ac123.net】2024欧洲杯竞猜app-推荐2024欧洲杯竞猜app大全|立即访问【ac123.net】
2024欧洲杯竞猜app-推荐2024欧洲杯竞猜app大全|立即访问【ac123.net】
ahmedendrise81
 
2024欧洲杯官网app下载-可靠的2024欧洲杯官网app下载-信誉的2024欧洲杯官网app下载网站|立即访问【ac123.net】
2024欧洲杯官网app下载-可靠的2024欧洲杯官网app下载-信誉的2024欧洲杯官网app下载网站|立即访问【ac123.net】2024欧洲杯官网app下载-可靠的2024欧洲杯官网app下载-信誉的2024欧洲杯官网app下载网站|立即访问【ac123.net】
2024欧洲杯官网app下载-可靠的2024欧洲杯官网app下载-信誉的2024欧洲杯官网app下载网站|立即访问【ac123.net】
ahmedendrise81
 
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
ahmedendrise81
 
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
ahmedendrise81
 

More from ahmedendrise81 (9)

外围买球-外围买球网站-外围买球|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
外围买球-外围买球网站-外围买球|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台外围买球-外围买球网站-外围买球|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
外围买球-外围买球网站-外围买球|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
 
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
 
2024欧洲杯押注在哪个app-2024欧洲杯押注在哪个app欢迎您-2024欧洲杯押注在哪个app|【​网址​🎉ac123.net🎉​】
2024欧洲杯押注在哪个app-2024欧洲杯押注在哪个app欢迎您-2024欧洲杯押注在哪个app|【​网址​🎉ac123.net🎉​】2024欧洲杯押注在哪个app-2024欧洲杯押注在哪个app欢迎您-2024欧洲杯押注在哪个app|【​网址​🎉ac123.net🎉​】
2024欧洲杯押注在哪个app-2024欧洲杯押注在哪个app欢迎您-2024欧洲杯押注在哪个app|【​网址​🎉ac123.net🎉​】
 
欧洲杯买球网好的网站-欧洲杯买球网好的网站网址-欧洲杯买球网好的网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球网好的网站-欧洲杯买球网好的网站网址-欧洲杯买球网好的网站|【​网址​🎉ac123.net🎉​】欧洲杯买球网好的网站-欧洲杯买球网好的网站网址-欧洲杯买球网好的网站|【​网址​🎉ac123.net🎉​】
欧洲杯买球网好的网站-欧洲杯买球网好的网站网址-欧洲杯买球网好的网站|【​网址​🎉ac123.net🎉​】
 
欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站-欧洲杯哪里有正规的买球网站|【​网址​🎉ac123.net🎉​】
 
2024欧洲杯竞猜app-推荐2024欧洲杯竞猜app大全|立即访问【ac123.net】
2024欧洲杯竞猜app-推荐2024欧洲杯竞猜app大全|立即访问【ac123.net】2024欧洲杯竞猜app-推荐2024欧洲杯竞猜app大全|立即访问【ac123.net】
2024欧洲杯竞猜app-推荐2024欧洲杯竞猜app大全|立即访问【ac123.net】
 
2024欧洲杯官网app下载-可靠的2024欧洲杯官网app下载-信誉的2024欧洲杯官网app下载网站|立即访问【ac123.net】
2024欧洲杯官网app下载-可靠的2024欧洲杯官网app下载-信誉的2024欧洲杯官网app下载网站|立即访问【ac123.net】2024欧洲杯官网app下载-可靠的2024欧洲杯官网app下载-信誉的2024欧洲杯官网app下载网站|立即访问【ac123.net】
2024欧洲杯官网app下载-可靠的2024欧洲杯官网app下载-信誉的2024欧洲杯官网app下载网站|立即访问【ac123.net】
 
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
 
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
欧洲杯投注官网-靠谱的网上欧洲杯投注官网-推荐欧洲杯投注官网|立即访问【ac123.net】
 

Recently uploaded

BKC Illuminates in Anticipation of the Ambani Wedding
BKC Illuminates in Anticipation of the Ambani WeddingBKC Illuminates in Anticipation of the Ambani Wedding
BKC Illuminates in Anticipation of the Ambani Wedding
Shaheen Kumar
 
SD Wealth Case Study001 - Is It Too Late 16.9.pdf
SD Wealth Case Study001 - Is It Too Late 16.9.pdfSD Wealth Case Study001 - Is It Too Late 16.9.pdf
SD Wealth Case Study001 - Is It Too Late 16.9.pdf
Martin Longden
 
Bath Spa University diploma
Bath Spa University diplomaBath Spa University diploma
Bath Spa University diploma
opyczu
 
Top Winter Men's Wear Trends for 2024 Theta Forever
Top Winter Men's Wear Trends for 2024 Theta ForeverTop Winter Men's Wear Trends for 2024 Theta Forever
Top Winter Men's Wear Trends for 2024 Theta Forever
Theta Forever
 
Dubai’s Promise Bridge_ A Symbol of Love, Hope, and Locks.pdf
Dubai’s Promise Bridge_ A Symbol of Love, Hope, and Locks.pdfDubai’s Promise Bridge_ A Symbol of Love, Hope, and Locks.pdf
Dubai’s Promise Bridge_ A Symbol of Love, Hope, and Locks.pdf
The Dubai Weekly
 
The Marietemara Leak – Inside the Scandal Rocking the Internet.pptx
The Marietemara Leak – Inside the Scandal Rocking the Internet.pptxThe Marietemara Leak – Inside the Scandal Rocking the Internet.pptx
The Marietemara Leak – Inside the Scandal Rocking the Internet.pptx
Blog Eternal
 
Cherub Names - Your Source for Celestial Baby Names.pdf
Cherub Names - Your Source for Celestial Baby Names.pdfCherub Names - Your Source for Celestial Baby Names.pdf
Cherub Names - Your Source for Celestial Baby Names.pdf
cherubnames
 
The Controversial Story of Rose McGowan’s Nude Photos Revealed.pdf
The Controversial Story of Rose McGowan’s Nude Photos Revealed.pdfThe Controversial Story of Rose McGowan’s Nude Photos Revealed.pdf
The Controversial Story of Rose McGowan’s Nude Photos Revealed.pdf
Janice Moton
 
New Rugs Collection by Brink & Campman
New Rugs Collection  by  Brink & CampmanNew Rugs Collection  by  Brink & Campman
New Rugs Collection by Brink & Campman
The Rug Shop UK
 
CalArts degree offer diploma Transcript
CalArts degree offer diploma TranscriptCalArts degree offer diploma Transcript
CalArts degree offer diploma Transcript
vydzak
 
CBU biyezheng degree offer diploma Transcript
CBU biyezheng degree offer diploma TranscriptCBU biyezheng degree offer diploma Transcript
CBU biyezheng degree offer diploma Transcript
emmugby
 
TUOS degree offer diploma Transcript
TUOS degree offer diploma TranscriptTUOS degree offer diploma Transcript
TUOS degree offer diploma Transcript
qwbyg
 
Bella DePaulo, Lessons from 3 decades studying singlehood.pdf
Bella DePaulo, Lessons from 3 decades studying singlehood.pdfBella DePaulo, Lessons from 3 decades studying singlehood.pdf
Bella DePaulo, Lessons from 3 decades studying singlehood.pdf
Life Legally Single
 
Al-Muslim Jewellers Islamabad - Hafiz M Asghar
Al-Muslim Jewellers Islamabad - Hafiz M AsgharAl-Muslim Jewellers Islamabad - Hafiz M Asghar
Al-Muslim Jewellers Islamabad - Hafiz M Asghar
MasudRana936486
 
Concordia biyezheng degree offer diploma Transcript
Concordia biyezheng degree offer diploma TranscriptConcordia biyezheng degree offer diploma Transcript
Concordia biyezheng degree offer diploma Transcript
emmugby
 
Pranayama And Meditation Class Introduction
Pranayama And Meditation Class IntroductionPranayama And Meditation Class Introduction
Pranayama And Meditation Class Introduction
Stuart McGill
 
SFU biyezheng degree offer diploma Transcript
SFU biyezheng degree offer diploma TranscriptSFU biyezheng degree offer diploma Transcript
SFU biyezheng degree offer diploma Transcript
emmugby
 
Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Pune 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No1 in City
neshakor5152
 

Recently uploaded (18)

BKC Illuminates in Anticipation of the Ambani Wedding
BKC Illuminates in Anticipation of the Ambani WeddingBKC Illuminates in Anticipation of the Ambani Wedding
BKC Illuminates in Anticipation of the Ambani Wedding
 
SD Wealth Case Study001 - Is It Too Late 16.9.pdf
SD Wealth Case Study001 - Is It Too Late 16.9.pdfSD Wealth Case Study001 - Is It Too Late 16.9.pdf
SD Wealth Case Study001 - Is It Too Late 16.9.pdf
 
Bath Spa University diploma
Bath Spa University diplomaBath Spa University diploma
Bath Spa University diploma
 
Top Winter Men's Wear Trends for 2024 Theta Forever
Top Winter Men's Wear Trends for 2024 Theta ForeverTop Winter Men's Wear Trends for 2024 Theta Forever
Top Winter Men's Wear Trends for 2024 Theta Forever
 
Dubai’s Promise Bridge_ A Symbol of Love, Hope, and Locks.pdf
Dubai’s Promise Bridge_ A Symbol of Love, Hope, and Locks.pdfDubai’s Promise Bridge_ A Symbol of Love, Hope, and Locks.pdf
Dubai’s Promise Bridge_ A Symbol of Love, Hope, and Locks.pdf
 
The Marietemara Leak – Inside the Scandal Rocking the Internet.pptx
The Marietemara Leak – Inside the Scandal Rocking the Internet.pptxThe Marietemara Leak – Inside the Scandal Rocking the Internet.pptx
The Marietemara Leak – Inside the Scandal Rocking the Internet.pptx
 
Cherub Names - Your Source for Celestial Baby Names.pdf
Cherub Names - Your Source for Celestial Baby Names.pdfCherub Names - Your Source for Celestial Baby Names.pdf
Cherub Names - Your Source for Celestial Baby Names.pdf
 
The Controversial Story of Rose McGowan’s Nude Photos Revealed.pdf
The Controversial Story of Rose McGowan’s Nude Photos Revealed.pdfThe Controversial Story of Rose McGowan’s Nude Photos Revealed.pdf
The Controversial Story of Rose McGowan’s Nude Photos Revealed.pdf
 
New Rugs Collection by Brink & Campman
New Rugs Collection  by  Brink & CampmanNew Rugs Collection  by  Brink & Campman
New Rugs Collection by Brink & Campman
 
CalArts degree offer diploma Transcript
CalArts degree offer diploma TranscriptCalArts degree offer diploma Transcript
CalArts degree offer diploma Transcript
 
CBU biyezheng degree offer diploma Transcript
CBU biyezheng degree offer diploma TranscriptCBU biyezheng degree offer diploma Transcript
CBU biyezheng degree offer diploma Transcript
 
TUOS degree offer diploma Transcript
TUOS degree offer diploma TranscriptTUOS degree offer diploma Transcript
TUOS degree offer diploma Transcript
 
Bella DePaulo, Lessons from 3 decades studying singlehood.pdf
Bella DePaulo, Lessons from 3 decades studying singlehood.pdfBella DePaulo, Lessons from 3 decades studying singlehood.pdf
Bella DePaulo, Lessons from 3 decades studying singlehood.pdf
 
Al-Muslim Jewellers Islamabad - Hafiz M Asghar
Al-Muslim Jewellers Islamabad - Hafiz M AsgharAl-Muslim Jewellers Islamabad - Hafiz M Asghar
Al-Muslim Jewellers Islamabad - Hafiz M Asghar
 
Concordia biyezheng degree offer diploma Transcript
Concordia biyezheng degree offer diploma TranscriptConcordia biyezheng degree offer diploma Transcript
Concordia biyezheng degree offer diploma Transcript
 
Pranayama And Meditation Class Introduction
Pranayama And Meditation Class IntroductionPranayama And Meditation Class Introduction
Pranayama And Meditation Class Introduction
 
SFU biyezheng degree offer diploma Transcript
SFU biyezheng degree offer diploma TranscriptSFU biyezheng degree offer diploma Transcript
SFU biyezheng degree offer diploma Transcript
 
Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Pune 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Pune 000XX00000 Provide Best And Top Girl Service And No1 in City
 

欧洲杯下注网站-欧洲杯下注网站平台-欧洲杯下注网站|【​网址​🎉ac10.net🎉​】