SlideShare a Scribd company logo
Module 1
operations, basic operators,data types, variables,
basic input-output
Hello, world!
Module 1 Hello, World
Module Objective
how to write
and run simple
Python
programs;
what Python
literals,
operators, and
expressions
are;
what variables
are and what
are the rules
that govern
them;
how to
perform basic
input and
output
operations.
Module 1 Hello, World
Hello, World!
Print("Hello, World!")
print()
An effect A result The argument(s)
Module 1 Hello, World
Function
checks if the name specified is legal
checks if the function's requirements for the number of
arguments allows you to invoke the function in this way
checks if the function's requirements for the number of
arguments allows you to invoke the function in this way
leaves your code for a moment and jumps into
the function you want to invoke
returns to your code and resumes its execution
Function_name(argument)
Module 1 Hello, World
The print() function
What is the effect the print() function causes?
• takes its arguments
• converts them into human-readable form
• sends the resulting data to the output device
What arguments does print() expect?
• all types of data: strings, numbers, characters, logical
values, objects
What value does the print() function return?
• None. Its effect is enough.
Module 1 Hello, World
The print() function - instructions
print("The itsy bitsy spider climbed up the waterspout.")
print()
print("Down came the rain and washed the spider out.")
The itsy bitsy spider climbed up the waterspout.
Down came the rain and washed the spider out.
Module 1 Hello, World
The escape and newline characters
print("The itsy bitsy spidernclimbed up the waterspout.")
print()
print("Down came the rainnand washed the spider out.")
The itsy bitsy spider
climbed up the waterspout.
Down came the rain
and washed the spider out.
Module 1 Hello, World
Using multiple arguments
print("The itsy bitsy spider" , "climbed up" , "the waterspout.")
The itsy bitsy spider climbed up the waterspout.
Module 1 Hello, World
Passing the arguments
print("My name is", "Python.")
print("Monty Python.")
My name is Python.
Monty Python.
Module 1 Hello, World
The keyword arguments 1
print("My name is", "Python.", end=" ")
print("Monty Python.")
My name is Python. Monty Python.
Keyword
argument
A
keyword(en
d)
An equal
sign(=)
A value
Module 1 Hello, World
The keyword arguments 2
print("My", "name", "is", "Monty", "Python.", sep="-")
My-name-is-Monty-Python.
print("My", "name", "is", sep="_", end="*")
print("Monty", "Python.", sep="*", end="*n")
My_name_is*Monty*Python.*
Module 1 Hello, World
Key takeaways
• Built-in function: print()
• Python 3.8 with 69 built-in functions
• To call a function
• Strings are delimited with quotes
• Computer programs are collections of instructions
• The backslash ()
• Positional arguments
• Keyword arguments: end, sep
Module 1 Hello, World
LAB Practice
1. The print() function
2. Formatting the output

More Related Content

PPTX
PPTX
Tuples, Dicts and Exception Handling
PDF
Python made easy
PDF
An introduction to Python for absolute beginners
PPTX
Introduction to Prolog
PPTX
Artificial Intelligence and Expert System
PDF
4. python functions
PPTX
Objective-C: Under The Hood
Tuples, Dicts and Exception Handling
Python made easy
An introduction to Python for absolute beginners
Introduction to Prolog
Artificial Intelligence and Expert System
4. python functions
Objective-C: Under The Hood

What's hot (6)

PDF
Python Loop
PPTX
Basic Python Programming: Part 01 and Part 02
PPT
programming with python ppt
PPTX
Introduction to Python programming
PPTX
Python 101: Python for Absolute Beginners (PyTexas 2014)
PPTX
Python for Beginners(v1)
Python Loop
Basic Python Programming: Part 01 and Part 02
programming with python ppt
Introduction to Python programming
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python for Beginners(v1)
Ad

Similar to IHTM Python PCEP Hello World (20)

PPTX
Python Programming Basics for begginners
PPTX
Learn Python The Hard Way Presentation
PDF
Python Course Functions and Modules Slides
PPTX
Introduction-to-Python-Programming1.pptx
PPTX
Introduction To Python.pptx
PPTX
Python-Certification-Training-Day-1-2.pptx
PPTX
Python basics
PPTX
Python basics
PPTX
Python basics
PPTX
Python basics
PPTX
Python basics
PPTX
Python basics
PPTX
Python basics
PPTX
Python basics
PPTX
Introduction to Python for Security Professionals
PPTX
Python
PDF
Python PPT1.pdf
PPTX
An Introduction : Python
PPT
python installation in different Operating Systems.ppt
PPTX
Unit2 input output
Python Programming Basics for begginners
Learn Python The Hard Way Presentation
Python Course Functions and Modules Slides
Introduction-to-Python-Programming1.pptx
Introduction To Python.pptx
Python-Certification-Training-Day-1-2.pptx
Python basics
Python basics
Python basics
Python basics
Python basics
Python basics
Python basics
Python basics
Introduction to Python for Security Professionals
Python
Python PPT1.pdf
An Introduction : Python
python installation in different Operating Systems.ppt
Unit2 input output
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
Python PCEP Literals
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
Python PCEP Literals
IHTM Python PCEP Introduction to Python
Python PCEP Welcome Opening

Recently uploaded (20)

PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
Funds Management Learning Material for Beg
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
artificial intelligence overview of it and more
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
The Internet -By the Numbers, Sri Lanka Edition
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
DOCX
Unit-3 cyber security network security of internet system
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
Slides PPTX World Game (s) Eco Economic Epochs.pptx
522797556-Unit-2-Temperature-measurement-1-1.pptx
Funds Management Learning Material for Beg
Paper PDF World Game (s) Great Redesign.pdf
Design_with_Watersergyerge45hrbgre4top (1).ppt
artificial intelligence overview of it and more
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
The Internet -By the Numbers, Sri Lanka Edition
Job_Card_System_Styled_lorem_ipsum_.pptx
Introuction about ICD -10 and ICD-11 PPT.pptx
Introuction about WHO-FIC in ICD-10.pptx
An introduction to the IFRS (ISSB) Stndards.pdf
presentation_pfe-universite-molay-seltan.pptx
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Unit-3 cyber security network security of internet system
SASE Traffic Flow - ZTNA Connector-1.pdf
Decoding a Decade: 10 Years of Applied CTI Discipline

IHTM Python PCEP Hello World

  • 1. Module 1 operations, basic operators,data types, variables, basic input-output Hello, world!
  • 2. Module 1 Hello, World Module Objective how to write and run simple Python programs; what Python literals, operators, and expressions are; what variables are and what are the rules that govern them; how to perform basic input and output operations.
  • 3. Module 1 Hello, World Hello, World! Print("Hello, World!") print() An effect A result The argument(s)
  • 4. Module 1 Hello, World Function checks if the name specified is legal checks if the function's requirements for the number of arguments allows you to invoke the function in this way checks if the function's requirements for the number of arguments allows you to invoke the function in this way leaves your code for a moment and jumps into the function you want to invoke returns to your code and resumes its execution Function_name(argument)
  • 5. Module 1 Hello, World The print() function What is the effect the print() function causes? • takes its arguments • converts them into human-readable form • sends the resulting data to the output device What arguments does print() expect? • all types of data: strings, numbers, characters, logical values, objects What value does the print() function return? • None. Its effect is enough.
  • 6. Module 1 Hello, World The print() function - instructions print("The itsy bitsy spider climbed up the waterspout.") print() print("Down came the rain and washed the spider out.") The itsy bitsy spider climbed up the waterspout. Down came the rain and washed the spider out.
  • 7. Module 1 Hello, World The escape and newline characters print("The itsy bitsy spidernclimbed up the waterspout.") print() print("Down came the rainnand washed the spider out.") The itsy bitsy spider climbed up the waterspout. Down came the rain and washed the spider out.
  • 8. Module 1 Hello, World Using multiple arguments print("The itsy bitsy spider" , "climbed up" , "the waterspout.") The itsy bitsy spider climbed up the waterspout.
  • 9. Module 1 Hello, World Passing the arguments print("My name is", "Python.") print("Monty Python.") My name is Python. Monty Python.
  • 10. Module 1 Hello, World The keyword arguments 1 print("My name is", "Python.", end=" ") print("Monty Python.") My name is Python. Monty Python. Keyword argument A keyword(en d) An equal sign(=) A value
  • 11. Module 1 Hello, World The keyword arguments 2 print("My", "name", "is", "Monty", "Python.", sep="-") My-name-is-Monty-Python. print("My", "name", "is", sep="_", end="*") print("Monty", "Python.", sep="*", end="*n") My_name_is*Monty*Python.*
  • 12. Module 1 Hello, World Key takeaways • Built-in function: print() • Python 3.8 with 69 built-in functions • To call a function • Strings are delimited with quotes • Computer programs are collections of instructions • The backslash () • Positional arguments • Keyword arguments: end, sep
  • 13. Module 1 Hello, World LAB Practice 1. The print() function 2. Formatting the output