SlideShare una empresa de Scribd logo
1 de 12
Python programming
Shalu Chaudhary
DATA TYPES
• Data Types define the type of value a
variable can store and can perform
operations on.
• Example :
A variable with data type as int
will store only integer type values and
not decimal or String values.
NUMERIC:
-INTEGER
-FLOAT
-BOOLEAN
-COMPLEX
SETS
SEQUENCES:
-LIST
-TUPLE
-STRING
MAPPINGS:
-DICTIONARY
NONE
OPERATORS
•Operators are special symbols that
are used to perform operations on
variables (or even literals).
•The values on which they perform
operations are called operands.
ARITHMETIC:
-ADD(+)
-SUBTRACT(-)
-DIVISION(/)
-FLOOR
DIVISION(//)
-EXPONENT(**)
-
MULTIPLICATIO
N(*)
LOGICAL:
-AND(and)
-OR(or)
-NOT(not)
IDENTITY:
-IS(is)
-IS NOT(is not)
MEMBERSHIP:
-IN(in)
-NOT IN(not in)
ASSIGNMENT:
-(=)
And SHORTCUT
operators.
RELATIONAL:
-GREATER(>)
-SMALLER(<)
-EQUAL(==)
-GREATER THAN OR
EQUAL(>=)
-SMALLER OR
EQUAL(<=)
-NOT EQUAL(!=)
EXPRESSIONS
An expression is defined as a combination of
constants, variables, and operators. An
expression always evaluates to a value. A
value or a standalone variable is also
considered as an expression but a
standalone operator is not an expression.
Example:
(i) 100 (ii) num (iii) "Global" + "Citizen"
(iv) 3.0 + 3.14 (v) 23/3 -5 * 7(14 -
2)
STATEMENT
A statement is a unit of code that the
Python interpreter can execute.
This can be an assignment statement,
a print statement, etc.
Eg-
• print(“This is a print statement.”)
• a=5
print(a)
INPUT
Input in Python can be done by using the
input() function, that prompts the user
to enter an input. The input is always
treated as a String, but can be later
converted into the desired data type
using Type Conversion.
Eg-
input(“Enter the number you want to
store in a:”)
OUTPUT
Output in Python can be done by using the
print() function that prints the
statement or value or result of an
expression that is written in
parenthesis.
Eg-
print(“This is an example of a print
statement.”)
DEBUGGING
Debugging is the process of removing any
mistake or error in the program code.
These can be Syntax errors (when the
syntax is not followed properly), or
Logical errors (when there is an error in
the program logic; these are not
detected by the Python interpreter) or
Runtime errors (where the program may
run but doesn’t give the expected
output.
TYPE CONVERSION
Type Conversion is the process of converting
one data type to another data type, either
by user intervention (Explicit) or
automatically by the Python interpreter
(Implicit).
Eg-
Implicit—a=10;b=2.0
print(a+b) #output is in float-12.0
Explicit—a= int(“56”)
print(a) #output will be integer type a
THANK YOU
--SHALU
CHAUDHARY--

Más contenido relacionado

Similar a Python_programming.pptx

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
Adam Getchell
 

Similar a Python_programming.pptx (20)

modul-python-all.pptx
modul-python-all.pptxmodul-python-all.pptx
modul-python-all.pptx
 
The Input Statement in Core Python .pptx
The Input Statement in Core Python .pptxThe Input Statement in Core Python .pptx
The Input Statement in Core Python .pptx
 
Python ppt
Python pptPython ppt
Python ppt
 
Python revision tour i
Python revision tour iPython revision tour i
Python revision tour i
 
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
 
An introduction to functional programming with Swift
An introduction to functional programming with SwiftAn introduction to functional programming with Swift
An introduction to functional programming with Swift
 
Python Basics by Akanksha Bali
Python Basics by Akanksha BaliPython Basics by Akanksha Bali
Python Basics by Akanksha Bali
 
Introduction to golang
Introduction to golangIntroduction to golang
Introduction to golang
 
Bt0065
Bt0065Bt0065
Bt0065
 
B T0065
B T0065B T0065
B T0065
 
Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning
 
Problem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study materialProblem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study material
 
Pc module1
Pc module1Pc module1
Pc module1
 
Monads in Swift
Monads in SwiftMonads in Swift
Monads in Swift
 
Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
 
Review Python
Review PythonReview Python
Review Python
 
Python PPT2
Python PPT2Python PPT2
Python PPT2
 
Programming in C
Programming in CProgramming in C
Programming in C
 
MODULE. .pptx
MODULE.                              .pptxMODULE.                              .pptx
MODULE. .pptx
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 

Python_programming.pptx