SlideShare a Scribd company logo
1 of 12
LET’S GO WITH
PYTHON
PREPARED BY…
V.VIDHIYA BHARATHY
ABOUT PYTHON
– First appearance at 20th Feb 1991.
– Developer: Python Software Foundation.
– Designed By: Guido Van Rossum.
– Stable Release: 2.7.14- Dec 17
3.6.4 – Dec 17
– File Extensions: .py, .pyc, .pyd, .pyo, .pyw, .pyz
– Popular IDE’s: pycharm, pydev, wing IDE, komodo IDX, Eric IDE
SPECIALITIES OF PYTHON
– High level programming language.
– Interpreted language.
– Dynamic type system .
– Automatic memory management.
– Object oriented programming.
– Functional and procedural programming.
– Large and comprehensive standard library.
BASIC COMMANDS
– Printing output: print(), print(‘welcome’), print(“welcome”)
– Getting input: input(),input(‘enter the value’)
int(input(‘getting integer number’), float(input(‘getting floating number’)
eval(input(‘getting input at any data type’), raw_input(‘getting input as string’)
VARIABLES
– name=‘star’  Assigning a string content to a variable
– rollno=1 Assigning a integer value to a variable
– Avg=92.39 Assigning a float value to a variable
– Dynamic memory allocation is followed here.
– We can remove the variable by “del” command
– del name
– Termination symbol “;” is not needed for every command but the Indentation
is important.
OPERATORS
– Arithmetic operators +,-,*,/
– Identity operator  “is”, “is not”
– Comparison operator <, >,!=, =
– Logical operator ”and”, “or”, “not”
– Membership operator ”in”
– Increment or decrement is only by x=x+1 (or) x+=1
– Boolean expression  “true”, ”false”
CONTROL STRUCTURES
– Conditional Branching  if, if…else, elif s-start
– Looping Statements  while and for statements e-end
st-step
if (): while(-----): for( I in range(s-,e-,st-)):
executable statement executable executable
elif(): statements statements
executable statement
else:
default statement
FUNCTIONS/MODULES
– Two types of functions are here, they are
standard library functions
User defined functions
– Standard library functions like math, random, time and etc…
– Three ways to import the library functions:
– import math
– import math as m
– from math import *
USER DEFINED FUNCTION
def function_name():
attributes required;
#Function_call using the function name
Function_name() function call
# (command line)
LIST
– Collection of certain values
– A=10 variable assignment
– A=[10,20,30] list(ie, like array )
– List will support all data type in a single storage variable for example,
B=[10,10.90,’start’]
– Dynamic addition, indexing, slicing are possible
TUPLE
– A=(1,2,3,4)
– The circular braces is used for tuple, and for list square braces is used.
– With this tuple we can retrieve the tuple and we can do indexing and slicing but
cannot do any modification into it.
– This is one of the specialities in python.
DICTIONARY
– Week={1:’sun’, 2:’mon’, 3:’tue’, 4:’wed’, 5:’thu’, 6:’fri’, 7:’sat’}
– The dictionary storage has two attribute in a element, that is first one is key
value : corresponding value.
– Retriving , deleting ,copying and updating elements can be done with this
storage.

More Related Content

What's hot

system management -shell programming by gaurav raikar
system management -shell programming by gaurav raikarsystem management -shell programming by gaurav raikar
system management -shell programming by gaurav raikarGauravRaikar3
 
Perl one-liners
Perl one-linersPerl one-liners
Perl one-linersdaoswald
 
Devry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesDevry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesnoahjamessss
 
Getting help in RHel 7 / CentOS 7
Getting help in RHel 7 / CentOS 7Getting help in RHel 7 / CentOS 7
Getting help in RHel 7 / CentOS 7Nilesh Vaghela
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell ScriptingMustafa Qasim
 
Python Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding StylePython Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding StyleShuen-Huei Guan
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)meashi
 
Vim Script Programming
Vim Script ProgrammingVim Script Programming
Vim Script ProgrammingLin Yo-An
 
Unix Programming with Perl 2
Unix Programming with Perl 2Unix Programming with Perl 2
Unix Programming with Perl 2Kazuho Oku
 
PenTest using Python By Purna Chander
PenTest using Python By Purna ChanderPenTest using Python By Purna Chander
PenTest using Python By Purna Chandernforceit
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals Sadia Bashir
 
Operating Systems 2
Operating Systems 2Operating Systems 2
Operating Systems 2hutchison
 
Operating Systems 1
Operating Systems 1Operating Systems 1
Operating Systems 1hutchison
 
COSCUP2012: How to write a bash script like the python?
COSCUP2012: How to write a bash script like the python?COSCUP2012: How to write a bash script like the python?
COSCUP2012: How to write a bash script like the python?Lloyd Huang
 
Make PHP Extension
Make PHP ExtensionMake PHP Extension
Make PHP ExtensionNyo Chou
 

What's hot (20)

system management -shell programming by gaurav raikar
system management -shell programming by gaurav raikarsystem management -shell programming by gaurav raikar
system management -shell programming by gaurav raikar
 
Perl one-liners
Perl one-linersPerl one-liners
Perl one-liners
 
Devry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesDevry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-files
 
Getting help in RHel 7 / CentOS 7
Getting help in RHel 7 / CentOS 7Getting help in RHel 7 / CentOS 7
Getting help in RHel 7 / CentOS 7
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
 
Python Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding StylePython Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding Style
 
PHP 5.3
PHP 5.3PHP 5.3
PHP 5.3
 
Unix(introduction)
Unix(introduction)Unix(introduction)
Unix(introduction)
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Vim Script Programming
Vim Script ProgrammingVim Script Programming
Vim Script Programming
 
Unix Programming with Perl 2
Unix Programming with Perl 2Unix Programming with Perl 2
Unix Programming with Perl 2
 
PenTest using Python By Purna Chander
PenTest using Python By Purna ChanderPenTest using Python By Purna Chander
PenTest using Python By Purna Chander
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals
 
Operating Systems 2
Operating Systems 2Operating Systems 2
Operating Systems 2
 
Operating Systems 1
Operating Systems 1Operating Systems 1
Operating Systems 1
 
bash
bashbash
bash
 
Python for Penetration testers
Python for Penetration testersPython for Penetration testers
Python for Penetration testers
 
COSCUP2012: How to write a bash script like the python?
COSCUP2012: How to write a bash script like the python?COSCUP2012: How to write a bash script like the python?
COSCUP2012: How to write a bash script like the python?
 
Make PHP Extension
Make PHP ExtensionMake PHP Extension
Make PHP Extension
 
01 linux basics
01 linux basics01 linux basics
01 linux basics
 

Similar to Learn Python in 40 characters

Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administrationvceder
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programmingNimrita Koul
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In PythonMarwan Osman
 
Introduction to Python Programming | InsideAIML
Introduction to Python Programming | InsideAIMLIntroduction to Python Programming | InsideAIML
Introduction to Python Programming | InsideAIMLVijaySharma802
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAdam Getchell
 
3 1. preprocessor, math, stdlib
3 1. preprocessor, math, stdlib3 1. preprocessor, math, stdlib
3 1. preprocessor, math, stdlib웅식 전
 
Introduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fastIntroduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fastBartosz Kosarzycki
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
 
Kqueue : Generic Event notification
Kqueue : Generic Event notificationKqueue : Generic Event notification
Kqueue : Generic Event notificationMahendra M
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubDevang Garach
 
A Head Start on Python Language
A Head Start on Python Language A Head Start on Python Language
A Head Start on Python Language saggi_decembre
 
Python introduction
Python introductionPython introduction
Python introductionRoger Xia
 

Similar to Learn Python in 40 characters (20)

Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administration
 
Let's Go-lang
Let's Go-langLet's Go-lang
Let's Go-lang
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
 
Python for dummies
Python for dummiesPython for dummies
Python for dummies
 
Python build your security tools.pdf
Python build your security tools.pdfPython build your security tools.pdf
Python build your security tools.pdf
 
Introduction to Python Programming | InsideAIML
Introduction to Python Programming | InsideAIMLIntroduction to Python Programming | InsideAIML
Introduction to Python Programming | InsideAIML
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
 
3 1. preprocessor, math, stdlib
3 1. preprocessor, math, stdlib3 1. preprocessor, math, stdlib
3 1. preprocessor, math, stdlib
 
Scala fundamentals
Scala fundamentalsScala fundamentals
Scala fundamentals
 
Introduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fastIntroduction to Flutter - truly crossplatform, amazingly fast
Introduction to Flutter - truly crossplatform, amazingly fast
 
Python
PythonPython
Python
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
 
Kqueue : Generic Event notification
Kqueue : Generic Event notificationKqueue : Generic Event notification
Kqueue : Generic Event notification
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
N flavors of streaming
N flavors of streamingN flavors of streaming
N flavors of streaming
 
A Head Start on Python Language
A Head Start on Python Language A Head Start on Python Language
A Head Start on Python Language
 
Go for Rubyists
Go for RubyistsGo for Rubyists
Go for Rubyists
 
Python introduction
Python introductionPython introduction
Python introduction
 

Recently uploaded

Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 

Recently uploaded (20)

Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 

Learn Python in 40 characters

  • 1. LET’S GO WITH PYTHON PREPARED BY… V.VIDHIYA BHARATHY
  • 2. ABOUT PYTHON – First appearance at 20th Feb 1991. – Developer: Python Software Foundation. – Designed By: Guido Van Rossum. – Stable Release: 2.7.14- Dec 17 3.6.4 – Dec 17 – File Extensions: .py, .pyc, .pyd, .pyo, .pyw, .pyz – Popular IDE’s: pycharm, pydev, wing IDE, komodo IDX, Eric IDE
  • 3. SPECIALITIES OF PYTHON – High level programming language. – Interpreted language. – Dynamic type system . – Automatic memory management. – Object oriented programming. – Functional and procedural programming. – Large and comprehensive standard library.
  • 4. BASIC COMMANDS – Printing output: print(), print(‘welcome’), print(“welcome”) – Getting input: input(),input(‘enter the value’) int(input(‘getting integer number’), float(input(‘getting floating number’) eval(input(‘getting input at any data type’), raw_input(‘getting input as string’)
  • 5. VARIABLES – name=‘star’  Assigning a string content to a variable – rollno=1 Assigning a integer value to a variable – Avg=92.39 Assigning a float value to a variable – Dynamic memory allocation is followed here. – We can remove the variable by “del” command – del name – Termination symbol “;” is not needed for every command but the Indentation is important.
  • 6. OPERATORS – Arithmetic operators +,-,*,/ – Identity operator  “is”, “is not” – Comparison operator <, >,!=, = – Logical operator ”and”, “or”, “not” – Membership operator ”in” – Increment or decrement is only by x=x+1 (or) x+=1 – Boolean expression  “true”, ”false”
  • 7. CONTROL STRUCTURES – Conditional Branching  if, if…else, elif s-start – Looping Statements  while and for statements e-end st-step if (): while(-----): for( I in range(s-,e-,st-)): executable statement executable executable elif(): statements statements executable statement else: default statement
  • 8. FUNCTIONS/MODULES – Two types of functions are here, they are standard library functions User defined functions – Standard library functions like math, random, time and etc… – Three ways to import the library functions: – import math – import math as m – from math import *
  • 9. USER DEFINED FUNCTION def function_name(): attributes required; #Function_call using the function name Function_name() function call # (command line)
  • 10. LIST – Collection of certain values – A=10 variable assignment – A=[10,20,30] list(ie, like array ) – List will support all data type in a single storage variable for example, B=[10,10.90,’start’] – Dynamic addition, indexing, slicing are possible
  • 11. TUPLE – A=(1,2,3,4) – The circular braces is used for tuple, and for list square braces is used. – With this tuple we can retrieve the tuple and we can do indexing and slicing but cannot do any modification into it. – This is one of the specialities in python.
  • 12. DICTIONARY – Week={1:’sun’, 2:’mon’, 3:’tue’, 4:’wed’, 5:’thu’, 6:’fri’, 7:’sat’} – The dictionary storage has two attribute in a element, that is first one is key value : corresponding value. – Retriving , deleting ,copying and updating elements can be done with this storage.