SlideShare a Scribd company logo
Basic Python Programming
By
S.P. Siddique Ibrahim
AP/CSE
9/1/2019
Overview of Programming
Languages
• Machine Language: Bianary form i.e
using only 0s and 1s.
• Assembly Language: Machine operations
are represented by mnemonic code(such as ADD &
MOV)
• High Level Language: Much easier to
write than low level language because program
instruction similar like English language.
High Level Language
Compiler
• It is a software
• Translate high level language code
into machine language code(0s and
1s)
• The compiled program is called
object code.
• It is a executable code does not need
the compiler during execution.
Interpreter
• Compiler converts all source code
into machine code.
• Where the interpreter reads the
source code line by line and converts
it into object code.
Linker
• Linking the different program
modules and libraries to form a
single executable program.
Loader
• Assign memory space in RAM for
the program being executed.
Internal working of python
Syntax checker and Translator
Python Virtual Machine(PVM)
Python code
Byte code
Input
STEPS
• STEP1: Python interpreter reads a
python code and verify it for syntax
error. If it found any error, immediately
halts the translation and shows an error
message.
• STEP2: If there is no error; interpreter
translate a code into byte code
• STEP3: Byte code is sent to the PVM.
Here again the byte code is executed on
PVM. If error found then the PVM halts
and show the error message.
Commenting in Python
• Python single line comment preceded
by a hash symbol (#)
• Three consecutive single quotation
marks ‘’’ are used to give multiple
comments (or) paragraph comments.
Example
• # Now learn how to comment in
Pyhon
• Print (“I am learning Python”)
• ‘’’Python tool
• Is easy to
• Learn’’’
• Print(‘bye’)
Python character set
• Letters: upper case and lower case
• Digits: 0,1…9
• Special symblos: _,{}[]()#*&^’”:;
• White space(tnx0bx0cr) space,
tab
Token
Python Tokens
Literals
Delimit
ers
Operators
Variables/Ide
ntifiers
Keywords
1. Literal
• Literals are numbers or strings or characters
appear in the program.
• Example:
• 78 – Integer literal
• 21.32- floating point literal
• ‘q’- character literal
• “Hello” – String literal
• (Python also contain list and dictionary)-see
later chapter
2. Value and Type
• To know type of any value in Python
use in-build method called
type(value)
• Example:
• >>>type(‘hello’)
• >>>type(“hello”)
• >>>type(123)
Keywords
• Keywords are fixed
meaning/reserved words.
• Cannot be used as
identifiers/variables.
• Sample keywords: from, none, with,
while, true, return, is , in, import, if ,
gloabl, for, finally, else….
Operator
• Python contains various operators
• Arithmetic - + - * / % **
• Relational == != <> <= >=
• Logical and not or
• Bitwise &~|^<< >>
Delimiter
• It is symbol that perform special role
in python like grouping, punctuation
and assignment
• () [] {}
• , :. = ;
Variable
• Identifier is the name used to find variable,
function, class or other objects
• Rules:
• Character consists of letter, underscore,
digits,
• Can be any length
• Starts with letter
• Can start with _
• Cannot starts with a digit
• Cannot be a keyword
Example
• First name
• 23name
• For
• Valid- name, _address, roll_no
The Print() Function
• The task of print function is to
display the contents on the screen
• Print(argument)
• >>>print(‘Hello welcome to python
programming’)
• Print(1000)
Print with quotation
• Use ()-backslash
• Print(“the attachment,
”remaining””)
Print with end argument
• Print(‘hello’,end=‘’)
• Print(‘world’,end=‘’)
• Print(‘goodbye’)

More Related Content

What's hot

Python final ppt
Python final pptPython final ppt
Python final ppt
Ripal Ranpara
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
amiable_indian
 
Python by Rj
Python by RjPython by Rj
Python programming
Python programmingPython programming
Python programming
Megha V
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
Aakashdata
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
AnirudhaGaikwad4
 
Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
Pedro Rodrigues
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
Srinivas Narasegouda
 
Python basics
Python basicsPython basics
Python basics
RANAALIMAJEEDRAJPUT
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
Tahani Al-Manie
 
Python made easy
Python made easy Python made easy
Python made easy
Abhishek kumar
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
Swarit Wadhe
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
Dr.YNM
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
KrishnaMildain
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
Dipankar Achinta
 
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Edureka!
 
Python
PythonPython
Python
Aashish Jain
 
Python
PythonPython
Python Crash Course
Python Crash CoursePython Crash Course
Python Crash Course
Haim Michael
 

What's hot (20)

Python final ppt
Python final pptPython final ppt
Python final ppt
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
 
Python by Rj
Python by RjPython by Rj
Python by Rj
 
Python programming
Python programmingPython programming
Python programming
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python basics
Python basicsPython basics
Python basics
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
Python made easy
Python made easy Python made easy
Python made easy
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
 
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | EdurekaPython Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
 
Python
PythonPython
Python
 
Python
PythonPython
Python
 
Python Crash Course
Python Crash CoursePython Crash Course
Python Crash Course
 

Similar to Python programming introduction

Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdfPy-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
shetoooelshitany74
 
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
notwa dfdfvs gf fdgfgh  s thgfgh frg regggnotwa dfdfvs gf fdgfgh  s thgfgh frg reggg
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
Godwin585235
 
presentation_python_7_1569170870_375360.pptx
presentation_python_7_1569170870_375360.pptxpresentation_python_7_1569170870_375360.pptx
presentation_python_7_1569170870_375360.pptx
ansariparveen06
 
Unit ii
Unit   iiUnit   ii
Unit ii
sathisaran
 
Python Programming
Python ProgrammingPython Programming
Python Programming
RenieMathews
 
X-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdfX-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdf
Alefya1
 
Python Programming 1.pptx
Python Programming 1.pptxPython Programming 1.pptx
Python Programming 1.pptx
Francis Densil Raj
 
Introduction to Python Programing
Introduction to Python ProgramingIntroduction to Python Programing
Introduction to Python Programing
sameer patil
 
COMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptxCOMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptx
MUSHAMHARIKIRAN6737
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
samiwaris2
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
Iffat Anjum
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
primeteacher32
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
MohammedMohammed578197
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler language
Ashok Raj
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
Abhay Kumar
 
Chapter-introduction about java programming
Chapter-introduction about java programmingChapter-introduction about java programming
Chapter-introduction about java programming
DrRajeshkumarPPatel
 

Similar to Python programming introduction (20)

Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdfPy-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
 
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
notwa dfdfvs gf fdgfgh  s thgfgh frg regggnotwa dfdfvs gf fdgfgh  s thgfgh frg reggg
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
 
presentation_python_7_1569170870_375360.pptx
presentation_python_7_1569170870_375360.pptxpresentation_python_7_1569170870_375360.pptx
presentation_python_7_1569170870_375360.pptx
 
Unit ii
Unit   iiUnit   ii
Unit ii
 
Python Programming
Python ProgrammingPython Programming
Python Programming
 
X-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdfX-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdf
 
Python Programming 1.pptx
Python Programming 1.pptxPython Programming 1.pptx
Python Programming 1.pptx
 
Introduction to Python Programing
Introduction to Python ProgramingIntroduction to Python Programing
Introduction to Python Programing
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
 
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDYC LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
 
C languaGE UNIT-1
C languaGE UNIT-1C languaGE UNIT-1
C languaGE UNIT-1
 
COMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptxCOMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptx
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler language
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
 
Chapter-introduction about java programming
Chapter-introduction about java programmingChapter-introduction about java programming
Chapter-introduction about java programming
 

More from Siddique Ibrahim

List in Python
List in PythonList in Python
List in Python
Siddique Ibrahim
 
Python Control structures
Python Control structuresPython Control structures
Python Control structures
Siddique Ibrahim
 
Data mining basic fundamentals
Data mining basic fundamentalsData mining basic fundamentals
Data mining basic fundamentals
Siddique Ibrahim
 
Basic networking
Basic networkingBasic networking
Basic networking
Siddique Ibrahim
 
Virtualization Concepts
Virtualization ConceptsVirtualization Concepts
Virtualization Concepts
Siddique Ibrahim
 
Networking devices(siddique)
Networking devices(siddique)Networking devices(siddique)
Networking devices(siddique)
Siddique Ibrahim
 
Osi model 7 Layers
Osi model 7 LayersOsi model 7 Layers
Osi model 7 Layers
Siddique Ibrahim
 
Mysql grand
Mysql grandMysql grand
Mysql grand
Siddique Ibrahim
 
Getting started into mySQL
Getting started into mySQLGetting started into mySQL
Getting started into mySQL
Siddique Ibrahim
 
pipelining
pipeliningpipelining
pipelining
Siddique Ibrahim
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
Siddique Ibrahim
 
Hardwired control
Hardwired controlHardwired control
Hardwired control
Siddique Ibrahim
 
interface
interfaceinterface
interface
Siddique Ibrahim
 
Interrupt
InterruptInterrupt
Interrupt
Siddique Ibrahim
 
Interrupt
InterruptInterrupt
Interrupt
Siddique Ibrahim
 
DMA
DMADMA
Io devies
Io deviesIo devies
Io devies
Siddique Ibrahim
 
Stack & queue
Stack & queueStack & queue
Stack & queue
Siddique Ibrahim
 
Metadata in data warehouse
Metadata in data warehouseMetadata in data warehouse
Metadata in data warehouse
Siddique Ibrahim
 
Data extraction, transformation, and loading
Data extraction, transformation, and loadingData extraction, transformation, and loading
Data extraction, transformation, and loading
Siddique Ibrahim
 

More from Siddique Ibrahim (20)

List in Python
List in PythonList in Python
List in Python
 
Python Control structures
Python Control structuresPython Control structures
Python Control structures
 
Data mining basic fundamentals
Data mining basic fundamentalsData mining basic fundamentals
Data mining basic fundamentals
 
Basic networking
Basic networkingBasic networking
Basic networking
 
Virtualization Concepts
Virtualization ConceptsVirtualization Concepts
Virtualization Concepts
 
Networking devices(siddique)
Networking devices(siddique)Networking devices(siddique)
Networking devices(siddique)
 
Osi model 7 Layers
Osi model 7 LayersOsi model 7 Layers
Osi model 7 Layers
 
Mysql grand
Mysql grandMysql grand
Mysql grand
 
Getting started into mySQL
Getting started into mySQLGetting started into mySQL
Getting started into mySQL
 
pipelining
pipeliningpipelining
pipelining
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
 
Hardwired control
Hardwired controlHardwired control
Hardwired control
 
interface
interfaceinterface
interface
 
Interrupt
InterruptInterrupt
Interrupt
 
Interrupt
InterruptInterrupt
Interrupt
 
DMA
DMADMA
DMA
 
Io devies
Io deviesIo devies
Io devies
 
Stack & queue
Stack & queueStack & queue
Stack & queue
 
Metadata in data warehouse
Metadata in data warehouseMetadata in data warehouse
Metadata in data warehouse
 
Data extraction, transformation, and loading
Data extraction, transformation, and loadingData extraction, transformation, and loading
Data extraction, transformation, and loading
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

Python programming introduction

  • 1. Basic Python Programming By S.P. Siddique Ibrahim AP/CSE 9/1/2019
  • 2. Overview of Programming Languages • Machine Language: Bianary form i.e using only 0s and 1s. • Assembly Language: Machine operations are represented by mnemonic code(such as ADD & MOV) • High Level Language: Much easier to write than low level language because program instruction similar like English language.
  • 4. Compiler • It is a software • Translate high level language code into machine language code(0s and 1s) • The compiled program is called object code. • It is a executable code does not need the compiler during execution.
  • 5. Interpreter • Compiler converts all source code into machine code. • Where the interpreter reads the source code line by line and converts it into object code.
  • 6. Linker • Linking the different program modules and libraries to form a single executable program.
  • 7. Loader • Assign memory space in RAM for the program being executed.
  • 8. Internal working of python Syntax checker and Translator Python Virtual Machine(PVM) Python code Byte code Input
  • 9. STEPS • STEP1: Python interpreter reads a python code and verify it for syntax error. If it found any error, immediately halts the translation and shows an error message. • STEP2: If there is no error; interpreter translate a code into byte code • STEP3: Byte code is sent to the PVM. Here again the byte code is executed on PVM. If error found then the PVM halts and show the error message.
  • 10. Commenting in Python • Python single line comment preceded by a hash symbol (#) • Three consecutive single quotation marks ‘’’ are used to give multiple comments (or) paragraph comments.
  • 11. Example • # Now learn how to comment in Pyhon • Print (“I am learning Python”) • ‘’’Python tool • Is easy to • Learn’’’ • Print(‘bye’)
  • 12. Python character set • Letters: upper case and lower case • Digits: 0,1…9 • Special symblos: _,{}[]()#*&^’”:; • White space(tnx0bx0cr) space, tab
  • 14. 1. Literal • Literals are numbers or strings or characters appear in the program. • Example: • 78 – Integer literal • 21.32- floating point literal • ‘q’- character literal • “Hello” – String literal • (Python also contain list and dictionary)-see later chapter
  • 15. 2. Value and Type • To know type of any value in Python use in-build method called type(value) • Example: • >>>type(‘hello’) • >>>type(“hello”) • >>>type(123)
  • 16. Keywords • Keywords are fixed meaning/reserved words. • Cannot be used as identifiers/variables. • Sample keywords: from, none, with, while, true, return, is , in, import, if , gloabl, for, finally, else….
  • 17. Operator • Python contains various operators • Arithmetic - + - * / % ** • Relational == != <> <= >= • Logical and not or • Bitwise &~|^<< >>
  • 18. Delimiter • It is symbol that perform special role in python like grouping, punctuation and assignment • () [] {} • , :. = ;
  • 19. Variable • Identifier is the name used to find variable, function, class or other objects • Rules: • Character consists of letter, underscore, digits, • Can be any length • Starts with letter • Can start with _ • Cannot starts with a digit • Cannot be a keyword
  • 20. Example • First name • 23name • For • Valid- name, _address, roll_no
  • 21. The Print() Function • The task of print function is to display the contents on the screen • Print(argument) • >>>print(‘Hello welcome to python programming’) • Print(1000)
  • 22. Print with quotation • Use ()-backslash • Print(“the attachment, ”remaining””)
  • 23. Print with end argument • Print(‘hello’,end=‘’) • Print(‘world’,end=‘’) • Print(‘goodbye’)