SlideShare a Scribd company logo
Module 1
operations, basic operators,data types, variables,
basic input-output
Python literals
Module 1 Python literals
Literals - the data in itself
123
• one hundred twenty three!
C
• the speed of light?
• the constant of integration?
• the length of a hypotenuse?
• ...?
print("2")
print(2)
2
2
be stored in completely
different ways in the
computer's memory
Module 1 Python literals
Octal and Hexadecimal numbers
the number eleven
million one hundred and
eleven thousand one
hundred and eleven
11111111
11_111_111
negative numbers?
-11111111
-
11_111_111
octal
• 0O or 0o prefix (zero-o)
hexadecimal
• 0x or 0X prefix (zero-x)
Module 1 Python literals
Floats & Exponent
2.5 -0.4 0.4 .4 4.0 4. 3 X 108 3E8: exponent
print(0.0000000000000000000001)
1e-22
Module 1 Python literals
Strings
• Strings are used when you need to process text.
"I am a
string."
I like "Monty
Python"
print("I like "Monty Python"")
print('I like "Monty Python"')
Module 1 Python literals
Boolean values
False
0
No, this is false
True
1
Yes, this is true
print(True > False)
print(True < False)
Module 1 Python literals
Key takeaways
• Literals are notations for representing some fixed values in code;
• A binary number is made up of 0s and 1s only;
• The numerical types: integers, floating-point numbers;
• Using the escape character;
• Boolean values: true & false
Module 1 Python literals
LAB Practice
3. Python literals-strings

More Related Content

PPTX
Basic use of Python
PPT
Data Structure and AlgorithmChapter1.ppt
PPT
An Introduction to Computer Logic and Digital Design.ppt
PPT
Python programming
PPT
Chapter1
PPTX
Python-Beginer-PartOnePython is one of the top programming languages in the w...
PPTX
COMPE361 Python Midterm 2 Notes Covering Socket, Threading, Matlib, and NUMPY
PPTX
PYTHON PROGRAMMING.pptx
Basic use of Python
Data Structure and AlgorithmChapter1.ppt
An Introduction to Computer Logic and Digital Design.ppt
Python programming
Chapter1
Python-Beginer-PartOnePython is one of the top programming languages in the w...
COMPE361 Python Midterm 2 Notes Covering Socket, Threading, Matlib, and NUMPY
PYTHON PROGRAMMING.pptx

Similar to Python PCEP Literals (20)

PPT
01-Python-Basics.ppt
PPT
Kaizen cso002 l1
PPT
(2) logic design lec foe-rd
PPT
Python
PPT
Python Programming Basic , introductions
PDF
Python Programminng…………………………………………………..
PDF
The str/bytes nightmare before python2 EOL
PDF
Introduction-to-Python-print-datatype.pdf
PPTX
Overview of Python - Bsides Detroit 2012
PDF
Sequencing and Attention Models - 2nd Version
PDF
Tutorial on-python-programming
PPTX
Presentation on python data type
PPTX
Presentation1 (1).pptx
PPT
PythonCourse_02_Expressions.ppt Python introduction turorial for beginner.
PDF
[YIDLUG] Programming Languages Differences, The Underlying Implementation 1 of 2
PPT
Chapter1.ppt
PPT
computer logic and digital design chapter 1
PPTX
Micro_Controllers_lab1_Intro_to_Arduino.pptx
PDF
Highlevel assemly
PPTX
Python Demo.pptx
01-Python-Basics.ppt
Kaizen cso002 l1
(2) logic design lec foe-rd
Python
Python Programming Basic , introductions
Python Programminng…………………………………………………..
The str/bytes nightmare before python2 EOL
Introduction-to-Python-print-datatype.pdf
Overview of Python - Bsides Detroit 2012
Sequencing and Attention Models - 2nd Version
Tutorial on-python-programming
Presentation on python data type
Presentation1 (1).pptx
PythonCourse_02_Expressions.ppt Python introduction turorial for beginner.
[YIDLUG] Programming Languages Differences, The Underlying Implementation 1 of 2
Chapter1.ppt
computer logic and digital design chapter 1
Micro_Controllers_lab1_Intro_to_Arduino.pptx
Highlevel assemly
Python Demo.pptx
Ad

More from IHTMINSTITUTE (19)

PPTX
Python PCEP Tuples and Dictionaries
PPTX
Python PCEP Tuples and Dictionaries
PPTX
Python PCEP Creating Simple Functions
PPTX
Python PCEP Functions And Scopes
PPTX
Python PCEP Function Parameters
PPTX
Python PCEP Functions
PPTX
Python PCEP Multidemensional Arrays
PPTX
Python PCEP Operations On Lists
PPTX
Python PCEP Sorting Simple Lists
PPTX
Python PCEP Lists Collections of Data
PPTX
Python PCEP Logic Bit Operations
PPTX
Python PCEP Loops
PPTX
Python PCEP Comparison Operators And Conditional Execution
PPTX
Python PCEP How To Talk To Computer
PPTX
Python PCEP Variables
PPTX
Python PCEP Operators
PPTX
IHTM Python PCEP Hello World
PPTX
IHTM Python PCEP Introduction to Python
PPTX
Python PCEP Welcome Opening
Python PCEP Tuples and Dictionaries
Python PCEP Tuples and Dictionaries
Python PCEP Creating Simple Functions
Python PCEP Functions And Scopes
Python PCEP Function Parameters
Python PCEP Functions
Python PCEP Multidemensional Arrays
Python PCEP Operations On Lists
Python PCEP Sorting Simple Lists
Python PCEP Lists Collections of Data
Python PCEP Logic Bit Operations
Python PCEP Loops
Python PCEP Comparison Operators And Conditional Execution
Python PCEP How To Talk To Computer
Python PCEP Variables
Python PCEP Operators
IHTM Python PCEP Hello World
IHTM Python PCEP Introduction to Python
Python PCEP Welcome Opening
Ad

Recently uploaded (20)

PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
Introduction to the IoT system, how the IoT system works
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
Internet___Basics___Styled_ presentation
PDF
Testing WebRTC applications at scale.pdf
PPTX
SAP Ariba Sourcing PPT for learning material
PPTX
artificial intelligence overview of it and more
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Funds Management Learning Material for Beg
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
SASE Traffic Flow - ZTNA Connector-1.pdf
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
RPKI Status Update, presented by Makito Lay at IDNOG 10
Introduction to the IoT system, how the IoT system works
Module 1 - Cyber Law and Ethics 101.pptx
WebRTC in SignalWire - troubleshooting media negotiation
presentation_pfe-universite-molay-seltan.pptx
introduction about ICD -10 & ICD-11 ppt.pptx
international classification of diseases ICD-10 review PPT.pptx
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PptxGenJS_Demo_Chart_20250317130215833.pptx
Internet___Basics___Styled_ presentation
Testing WebRTC applications at scale.pdf
SAP Ariba Sourcing PPT for learning material
artificial intelligence overview of it and more
Power Point - Lesson 3_2.pptx grad school presentation
Tenda Login Guide: Access Your Router in 5 Easy Steps
Funds Management Learning Material for Beg
Unit-1 introduction to cyber security discuss about how to secure a system
The New Creative Director: How AI Tools for Social Media Content Creation Are...

Python PCEP Literals

  • 1. Module 1 operations, basic operators,data types, variables, basic input-output Python literals
  • 2. Module 1 Python literals Literals - the data in itself 123 • one hundred twenty three! C • the speed of light? • the constant of integration? • the length of a hypotenuse? • ...? print("2") print(2) 2 2 be stored in completely different ways in the computer's memory
  • 3. Module 1 Python literals Octal and Hexadecimal numbers the number eleven million one hundred and eleven thousand one hundred and eleven 11111111 11_111_111 negative numbers? -11111111 - 11_111_111 octal • 0O or 0o prefix (zero-o) hexadecimal • 0x or 0X prefix (zero-x)
  • 4. Module 1 Python literals Floats & Exponent 2.5 -0.4 0.4 .4 4.0 4. 3 X 108 3E8: exponent print(0.0000000000000000000001) 1e-22
  • 5. Module 1 Python literals Strings • Strings are used when you need to process text. "I am a string." I like "Monty Python" print("I like "Monty Python"") print('I like "Monty Python"')
  • 6. Module 1 Python literals Boolean values False 0 No, this is false True 1 Yes, this is true print(True > False) print(True < False)
  • 7. Module 1 Python literals Key takeaways • Literals are notations for representing some fixed values in code; • A binary number is made up of 0s and 1s only; • The numerical types: integers, floating-point numbers; • Using the escape character; • Boolean values: true & false
  • 8. Module 1 Python literals LAB Practice 3. Python literals-strings