SlideShare a Scribd company logo
1 of 31
Created by Mr Suffar
Monday, August 28, 2023
Lesson objectives…
Understand how to setup Python IDLE.
Use the print and input functions successfully.
Explain the purpose of variables & constants.
Python Introduction
Lesson 1
Created by Mr Suffar
Video
https://youtu.be/KLcPJQPwTjU
You can either use Python IDLE or web browser based
python (repl it) on: https://repl.it/languages/python3
Setting up your IDE
Created by Mr Suffar
Starter activity
• Create a folder in your area
named: Python.
• Create another folder inside the
Python folder and name it:
Lesson 1.
• Open IDLE Python. Click on FILE
 New FILE.
Python Shell
Editor
Window
Python Introduction
Created by Mr Suffar
• Click on options > Configure
IDLE
• Change the font size to 25 and
tick BOLD then click APPLY
then click on OK
Python Introduction
Created by Mr Suffar
• Click on options > Configure
IDLE
• Click on GENERAL then click
on Open Edit Window then
click on APPLY and press OK.
Python Introduction
Created by Mr Suffar
Video
https://www.youtube.com/watch?v=HY7roHmN8vo
Lesson 1 - Theory
Created by Mr Suffar
Print function
Whenever you want to display something on the screen,
you must use the print command. You must ALWAYS
open and close the PARANTHESIS.
Created by Mr Suffar
Syntax error
Syntax: The order of instructions or commands.
Syntax Error: When you break the rules of the
programming language.
Examples:
• Print(“Welcome Tom”)
• print(“Football”
• print(Dancing)
Created by Mr Suffar
Complete task 1. Use the hint to help you.
Created by Mr Suffar
Print function
1- Type the following in python:
2- Press F5 to run the program.
3- Create a program that displays your name, your
country and date of birth on the screen on separate
lines. Hint: Use 3 print commands.
Created by Mr Suffar
Variables & Constants
Variable: A location in a
memory where data is
stored. It can be changed
while the program is
running.
Constant: A location in a
memory where data is
stored. It cannot be
changed while the program
is running.
Created by Mr Suffar
film = “Frozen”
print (film)
Assign film as
a variable
which stores
a value.
Displays the
value of the
variable.
Value
Variables & Constants
Created by Mr Suffar
• Hint: You DO NOT need Quotation mark when
storing numbers in a variable.
Assign film as
a variable
which stores
the value.
Displays the
value of the
variable.
Value
Variables & Constants
Created by Mr Suffar
film = “Lion King”
print (“My favourite film is” , film)
Concatenation: Joining things together.
In python, we can use the comma “,” to concatenate.
Variables & Constants
What will the above program display?
My Favourite film is Lion King.
Created by Mr Suffar
film = “Lion King”
print (“My favourite film is” , “film”)
What will this program display?
Variables & Constants
My favourite film is film
You must NOT put quotation marks around
variables.
Created by Mr Suffar
• The above code will ask the user to enter
their name. Then it will wait until the user
enters their name.
Variable called
“name”
Displays the
user’s answer
The
question
Input function
Displays the
user’s answer
Created by Mr Suffar
• This is what the program will display if you
enter Martin.
Variable called
“name”
Displays the
user’s answer
The
question
Input function
Displays the
user’s answer
Created by Mr Suffar
• What will the program display if you enter Martin.
• Your name is Martin
Variable called
“name”
The
question
Input function
Displays the
user’s answer
Created by Mr Suffar
Python Introduction
hobby = imput(“Enter a hobby”)
print (hobby)
Syntax errors occurs when you break the
rules of the programming language.
Identify the syntax error in the code above:
• imput should be changed to input.
Created by Mr Suffar
Complete task 1-7. Use the hint to help
you.
Then complete the extension task.
Tasks
Created by Mr Suffar
1. Display the following on 4 separate lines:
• I like Snapchat
• I like Instagram
• I like Twitter
• I love Facebook
Extension:
Display your name, your age and your gender on 3 separate lines.
Hint:
https://youtu.be/3G9LW5CGa7Y
Created by Mr Suffar
2. Create a variable called food and store your favourite food
inside the variable. Print out the value of the variable onto the
screen. YOU DO NOT NEED AN INPUT COMMAND.
Hint:
https://youtu.be/Kf5w5MhO_t8
Created by Mr Suffar
3) Ask the user for their favourite film. Display “I also like
watching”, film. Hint
https://youtu.be/V3GIhjCrnm0
Created by Mr Suffar
4. Create a program that ask the user for their hobby, surname, favourite colour
and favourite pet. Display the above on 4 separate lines. “Remember you can’t
have space in a variable name.
Hint:
https://youtu.be/Ru34WIgnZ08
Created by Mr Suffar
5. Create a program that ask the user for their name. Display the
name 1000 times. Use * to multiply.
Example:
Hint:
https://youtu.be/fZEUPpQ6gNQ
Created by Mr Suffar
6. Create a program that ask the user for their favourite food.
Display “I also like”, food. Food should be replaced with the user’s
answer. hint:
https://youtu.be/hpCJTgMdTb0
Created by Mr Suffar
7. Ask the user for their name and favourite hobby. Display “your
name is”, name, “and your favourite hobby is”, hobby. Example:
https://youtu.be/fr7nBwIEsOs
Created by Mr Suffar
Homework
Complete the extension tasks (task 8 and 9) if you’ve
finished the previous questions.
Extension
Created by Mr Suffar
8. Ask the user for a username. Then display “Welcome”, username.
https://youtu.be/PIdZZSV9jVU
Created by Mr Suffar
9. Ask the user to enter a random symbol such as #. Then display
that symbol 100 times.
https://youtu.be/UvsF0Nx5rYs
Created by Mr Suffar
Homework
Video of data types: https://youtu.be/ka3nBNi-j9M

More Related Content

Similar to Lesson-1---Python-Intro---print-and-input.pptx

EVALUATION.
EVALUATION.EVALUATION.
EVALUATION.hodan1
 
Youtube Marketing 2012
Youtube Marketing 2012Youtube Marketing 2012
Youtube Marketing 2012appletinao
 
7464 Movie Maker How To Guide Mtl
7464  Movie Maker  How To  Guide Mtl7464  Movie Maker  How To  Guide Mtl
7464 Movie Maker How To Guide Mtlmlofton62
 
Creating a Promo Video using Your iPad and Editing with iMovie for iPad
Creating a Promo Video using Your iPad and Editing with iMovie for iPadCreating a Promo Video using Your iPad and Editing with iMovie for iPad
Creating a Promo Video using Your iPad and Editing with iMovie for iPadNew Tricks
 
Editing Assessment
Editing Assessment Editing Assessment
Editing Assessment iain bruce
 
Webinar - Storymakers 3: Polishing Your Digital Story to Make It Shine! 2016-...
Webinar - Storymakers 3: Polishing Your Digital Story to Make It Shine! 2016-...Webinar - Storymakers 3: Polishing Your Digital Story to Make It Shine! 2016-...
Webinar - Storymakers 3: Polishing Your Digital Story to Make It Shine! 2016-...TechSoup
 
Final Cut Pro X Weynand Certification Lesson 3
Final Cut Pro X Weynand Certification Lesson 3Final Cut Pro X Weynand Certification Lesson 3
Final Cut Pro X Weynand Certification Lesson 3Samuel Edsall
 
Creating videos with Inshot
Creating videos with InshotCreating videos with Inshot
Creating videos with InshotZohida Soliyeva
 
How to-make-1000-dollars-per-day-with-you tube-videos.
How to-make-1000-dollars-per-day-with-you tube-videos.How to-make-1000-dollars-per-day-with-you tube-videos.
How to-make-1000-dollars-per-day-with-you tube-videos.jacky boo
 
Using Windows Live Movie Maker
Using Windows Live Movie MakerUsing Windows Live Movie Maker
Using Windows Live Movie MakerRichard Berg
 
7 Habits of Highly Effective YouTubers: Actionable Tactics to Step up Your Yo...
7 Habits of Highly Effective YouTubers: Actionable Tactics to Step up Your Yo...7 Habits of Highly Effective YouTubers: Actionable Tactics to Step up Your Yo...
7 Habits of Highly Effective YouTubers: Actionable Tactics to Step up Your Yo...BLASTmedia
 
IJNR Video Tips & Training
IJNR Video Tips & TrainingIJNR Video Tips & Training
IJNR Video Tips & TrainingMike Scott
 
Vidyard's Complete Guide to Video Production
Vidyard's Complete Guide to Video ProductionVidyard's Complete Guide to Video Production
Vidyard's Complete Guide to Video ProductionVidyard
 
Crush it with youtube
Crush it with youtubeCrush it with youtube
Crush it with youtubelawallekan2
 
Presentation3
Presentation3Presentation3
Presentation3hodan1
 
Trailer Tricks: Leveraging Cinematic and Artist Tools to Make Killer Game Tra...
Trailer Tricks: Leveraging Cinematic and Artist Tools to Make Killer Game Tra...Trailer Tricks: Leveraging Cinematic and Artist Tools to Make Killer Game Tra...
Trailer Tricks: Leveraging Cinematic and Artist Tools to Make Killer Game Tra...Unity Technologies
 
6: What have you learnt about technologies from the process of constructing t...
6: What have you learnt about technologies from the process of constructing t...6: What have you learnt about technologies from the process of constructing t...
6: What have you learnt about technologies from the process of constructing t...BrandanWiles
 

Similar to Lesson-1---Python-Intro---print-and-input.pptx (20)

EVALUATION.
EVALUATION.EVALUATION.
EVALUATION.
 
Youtube Marketing 2012
Youtube Marketing 2012Youtube Marketing 2012
Youtube Marketing 2012
 
Design and plan 3.5
Design and plan 3.5Design and plan 3.5
Design and plan 3.5
 
7464 Movie Maker How To Guide Mtl
7464  Movie Maker  How To  Guide Mtl7464  Movie Maker  How To  Guide Mtl
7464 Movie Maker How To Guide Mtl
 
Technologies
TechnologiesTechnologies
Technologies
 
Creating a Promo Video using Your iPad and Editing with iMovie for iPad
Creating a Promo Video using Your iPad and Editing with iMovie for iPadCreating a Promo Video using Your iPad and Editing with iMovie for iPad
Creating a Promo Video using Your iPad and Editing with iMovie for iPad
 
Editing Assessment
Editing Assessment Editing Assessment
Editing Assessment
 
Webinar - Storymakers 3: Polishing Your Digital Story to Make It Shine! 2016-...
Webinar - Storymakers 3: Polishing Your Digital Story to Make It Shine! 2016-...Webinar - Storymakers 3: Polishing Your Digital Story to Make It Shine! 2016-...
Webinar - Storymakers 3: Polishing Your Digital Story to Make It Shine! 2016-...
 
Final Cut Pro X Weynand Certification Lesson 3
Final Cut Pro X Weynand Certification Lesson 3Final Cut Pro X Weynand Certification Lesson 3
Final Cut Pro X Weynand Certification Lesson 3
 
Creating videos with Inshot
Creating videos with InshotCreating videos with Inshot
Creating videos with Inshot
 
How to-make-1000-dollars-per-day-with-you tube-videos.
How to-make-1000-dollars-per-day-with-you tube-videos.How to-make-1000-dollars-per-day-with-you tube-videos.
How to-make-1000-dollars-per-day-with-you tube-videos.
 
Using Windows Live Movie Maker
Using Windows Live Movie MakerUsing Windows Live Movie Maker
Using Windows Live Movie Maker
 
7 Habits of Highly Effective YouTubers: Actionable Tactics to Step up Your Yo...
7 Habits of Highly Effective YouTubers: Actionable Tactics to Step up Your Yo...7 Habits of Highly Effective YouTubers: Actionable Tactics to Step up Your Yo...
7 Habits of Highly Effective YouTubers: Actionable Tactics to Step up Your Yo...
 
IJNR Video Tips & Training
IJNR Video Tips & TrainingIJNR Video Tips & Training
IJNR Video Tips & Training
 
Vidyard's Complete Guide to Video Production
Vidyard's Complete Guide to Video ProductionVidyard's Complete Guide to Video Production
Vidyard's Complete Guide to Video Production
 
Crush it with youtube
Crush it with youtubeCrush it with youtube
Crush it with youtube
 
Presentation3
Presentation3Presentation3
Presentation3
 
Trailer Tricks: Leveraging Cinematic and Artist Tools to Make Killer Game Tra...
Trailer Tricks: Leveraging Cinematic and Artist Tools to Make Killer Game Tra...Trailer Tricks: Leveraging Cinematic and Artist Tools to Make Killer Game Tra...
Trailer Tricks: Leveraging Cinematic and Artist Tools to Make Killer Game Tra...
 
Question 4
Question 4 Question 4
Question 4
 
6: What have you learnt about technologies from the process of constructing t...
6: What have you learnt about technologies from the process of constructing t...6: What have you learnt about technologies from the process of constructing t...
6: What have you learnt about technologies from the process of constructing t...
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

Lesson-1---Python-Intro---print-and-input.pptx

  • 1. Created by Mr Suffar Monday, August 28, 2023 Lesson objectives… Understand how to setup Python IDLE. Use the print and input functions successfully. Explain the purpose of variables & constants. Python Introduction Lesson 1
  • 2. Created by Mr Suffar Video https://youtu.be/KLcPJQPwTjU You can either use Python IDLE or web browser based python (repl it) on: https://repl.it/languages/python3 Setting up your IDE
  • 3. Created by Mr Suffar Starter activity • Create a folder in your area named: Python. • Create another folder inside the Python folder and name it: Lesson 1. • Open IDLE Python. Click on FILE  New FILE. Python Shell Editor Window Python Introduction
  • 4. Created by Mr Suffar • Click on options > Configure IDLE • Change the font size to 25 and tick BOLD then click APPLY then click on OK Python Introduction
  • 5. Created by Mr Suffar • Click on options > Configure IDLE • Click on GENERAL then click on Open Edit Window then click on APPLY and press OK. Python Introduction
  • 6. Created by Mr Suffar Video https://www.youtube.com/watch?v=HY7roHmN8vo Lesson 1 - Theory
  • 7. Created by Mr Suffar Print function Whenever you want to display something on the screen, you must use the print command. You must ALWAYS open and close the PARANTHESIS.
  • 8. Created by Mr Suffar Syntax error Syntax: The order of instructions or commands. Syntax Error: When you break the rules of the programming language. Examples: • Print(“Welcome Tom”) • print(“Football” • print(Dancing)
  • 9. Created by Mr Suffar Complete task 1. Use the hint to help you.
  • 10. Created by Mr Suffar Print function 1- Type the following in python: 2- Press F5 to run the program. 3- Create a program that displays your name, your country and date of birth on the screen on separate lines. Hint: Use 3 print commands.
  • 11. Created by Mr Suffar Variables & Constants Variable: A location in a memory where data is stored. It can be changed while the program is running. Constant: A location in a memory where data is stored. It cannot be changed while the program is running.
  • 12. Created by Mr Suffar film = “Frozen” print (film) Assign film as a variable which stores a value. Displays the value of the variable. Value Variables & Constants
  • 13. Created by Mr Suffar • Hint: You DO NOT need Quotation mark when storing numbers in a variable. Assign film as a variable which stores the value. Displays the value of the variable. Value Variables & Constants
  • 14. Created by Mr Suffar film = “Lion King” print (“My favourite film is” , film) Concatenation: Joining things together. In python, we can use the comma “,” to concatenate. Variables & Constants What will the above program display? My Favourite film is Lion King.
  • 15. Created by Mr Suffar film = “Lion King” print (“My favourite film is” , “film”) What will this program display? Variables & Constants My favourite film is film You must NOT put quotation marks around variables.
  • 16. Created by Mr Suffar • The above code will ask the user to enter their name. Then it will wait until the user enters their name. Variable called “name” Displays the user’s answer The question Input function Displays the user’s answer
  • 17. Created by Mr Suffar • This is what the program will display if you enter Martin. Variable called “name” Displays the user’s answer The question Input function Displays the user’s answer
  • 18. Created by Mr Suffar • What will the program display if you enter Martin. • Your name is Martin Variable called “name” The question Input function Displays the user’s answer
  • 19. Created by Mr Suffar Python Introduction hobby = imput(“Enter a hobby”) print (hobby) Syntax errors occurs when you break the rules of the programming language. Identify the syntax error in the code above: • imput should be changed to input.
  • 20. Created by Mr Suffar Complete task 1-7. Use the hint to help you. Then complete the extension task. Tasks
  • 21. Created by Mr Suffar 1. Display the following on 4 separate lines: • I like Snapchat • I like Instagram • I like Twitter • I love Facebook Extension: Display your name, your age and your gender on 3 separate lines. Hint: https://youtu.be/3G9LW5CGa7Y
  • 22. Created by Mr Suffar 2. Create a variable called food and store your favourite food inside the variable. Print out the value of the variable onto the screen. YOU DO NOT NEED AN INPUT COMMAND. Hint: https://youtu.be/Kf5w5MhO_t8
  • 23. Created by Mr Suffar 3) Ask the user for their favourite film. Display “I also like watching”, film. Hint https://youtu.be/V3GIhjCrnm0
  • 24. Created by Mr Suffar 4. Create a program that ask the user for their hobby, surname, favourite colour and favourite pet. Display the above on 4 separate lines. “Remember you can’t have space in a variable name. Hint: https://youtu.be/Ru34WIgnZ08
  • 25. Created by Mr Suffar 5. Create a program that ask the user for their name. Display the name 1000 times. Use * to multiply. Example: Hint: https://youtu.be/fZEUPpQ6gNQ
  • 26. Created by Mr Suffar 6. Create a program that ask the user for their favourite food. Display “I also like”, food. Food should be replaced with the user’s answer. hint: https://youtu.be/hpCJTgMdTb0
  • 27. Created by Mr Suffar 7. Ask the user for their name and favourite hobby. Display “your name is”, name, “and your favourite hobby is”, hobby. Example: https://youtu.be/fr7nBwIEsOs
  • 28. Created by Mr Suffar Homework Complete the extension tasks (task 8 and 9) if you’ve finished the previous questions. Extension
  • 29. Created by Mr Suffar 8. Ask the user for a username. Then display “Welcome”, username. https://youtu.be/PIdZZSV9jVU
  • 30. Created by Mr Suffar 9. Ask the user to enter a random symbol such as #. Then display that symbol 100 times. https://youtu.be/UvsF0Nx5rYs
  • 31. Created by Mr Suffar Homework Video of data types: https://youtu.be/ka3nBNi-j9M

Editor's Notes

  1. Shell runs single instructions Editor allows you to save and then go back and edit programs at later points
  2. Shell runs single instructions Editor allows you to save and then go back and edit programs at later points
  3. Shell runs single instructions Editor allows you to save and then go back and edit programs at later points
  4. Shell runs single instructions Editor allows you to save and then go back and edit programs at later points
  5. Shell runs single instructions Editor allows you to save and then go back and edit programs at later points
  6. Demonstrate first example, ask students to explain second example, and now ask them to carry on with the task sheet.
  7. Demonstrate first example, ask students to explain second example, and now ask them to carry on with the task sheet.