SlideShare a Scribd company logo
1 of 19
Programming
http://www.yahmad.co.uk/
Python Programming
Lesson 1: Introduction to Python
and Variables
Spiritual ‫روحاني‬
‫وتعالى‬ ‫تبارك‬ ‫هللا‬ ‫قول‬
:
﴿
ُ‫م‬ َ‫ك‬ْ‫ي‬َ‫ل‬ِ‫إ‬ ُ‫ه‬‫ا‬َ‫ن‬ْ‫ل‬َ‫ز‬ْ‫ن‬َ‫أ‬ ٌ‫اب‬َ‫ت‬ِ‫ك‬
َ‫و‬ ِ‫ه‬ِ‫ت‬‫ا‬َ‫ي‬‫آ‬ ‫وا‬ُ‫ر‬َّ‫ب‬َّ‫د‬َ‫ي‬ِ‫ل‬ ٌ‫ك‬َ‫ار‬َ‫ب‬
َ‫َّر‬‫ك‬َ‫ذ‬َ‫ت‬َ‫ي‬ِ‫ل‬
ِ‫ب‬‫ا‬َ‫ب‬ْ‫ل‬َ ْ
‫اْل‬ ‫و‬ُ‫ل‬‫و‬ُ‫أ‬
﴾
[
‫ص‬
:
29
]
God Almighty said: “(This is) a Book (the Qur’an) which
We have sent down to you, full of blessings that they may
ponder over its Verses, and that men of understanding
may remember. [Saad:29]
Python In Qatar
Learning objective-
1. To know about the programming
2. To know how to open IDLE.
3. To know about the Command prompt, python shell and the statement
4. To know how to print the simple message on python shell.
5. Understand how to use Python to carry out simple calculations.
Outcomes Time
Task 1 Simple printing any message on the python shell.
Task 2 Simple Equations and Printing using the Python Shell
What is programming-
PROGRAM- Program is using a set of instructions to tell a
computer how to perform a task.
All of the programs and applications on computers have to
be written by people, who use programming language , such
as Python.
Extension Task-
Search on google and make a list of different programming
languages.
Opening IDLE
In order to use Python you’ll need to open an
application on your computer that can run python. One
of the applications used for writing and editing python
programs is called IDLE.
IDLE - Integrated Development and Learning
Environment.
IDLE is the standard Python development
environment.
Returning to your first Python
program
Command Prompt- The >>> is called the command prompt as it
is prompting you to give an instruction or command.
Python Shell- The window into which you type the commands is
called a python shell.
Statement- A statement is a single instructions of python code.
Programming
Task 1 – Simple Equations and Printing using the
Python Shell
Enter the following Equations into the Python Shell. The Python Shell will work as a
calculator to work out the values.
Using the slash (/) will work out
the divided value – 10.4
/
%
Using the slash (%) will work out
the remainder – 2
Use the Print command to introduce
yourself to Python. The print
command will return the values in
speech marks in the brackets.
(“ “)
print
Activity Task
Q1. By using python shell print the following statement.
“Space”
“A really big place”
“That contain a lot of stuff”
“And a lot of nothing between the stuff.”
“This is why it is called space.”
“This definition of space is stupid.”
Programming
Task 1 – Simple Equations using the Python Shell
Python will follow the
BODMAS order of
operations to complete
calculations.
Enter the following
Equations
B: Work out the contents in the Brackets first.
O: Exponents/indices have second priority (Powers
and Roots)
AS: Last are Addition and Subtraction
DM: Division and Multiplication are next
Activity Task-
By using python shell enter the following equations and run it.
Programming
Task 2 – Simple Equations and Printing using Variables
1) Click on File >> New File
2) Write the program below and
then Run Module.
3) Write the program below and then
Run Module.
Variable: Placeholder to store values which
can be called upon later in the program
Print: Will print a statement placed in brackets
STR: Datatype for a Text String
INT: These values are being
stored as Integers
Integer values (int) need to be converted
into a text string (str).
+
Join
parts of
text
string
Assigned
Variables
Programming
1. You need to create a simple
program to enter data into
variables.
2. You will be required to print
each variable.
STR: Data type for a Text String
(Default Data type – “hello”)
INT – Data type for Integer values
(5, 665, 4545, 54, 565)
Float – Data type for decimal numbers
(4.5, 5.66, 65.6)
INT
Float
Task 3 – Inputting Values into Variables and Printing.
Programming
1. You need to create a simple program to enter data into variables
2. You will then print the variables as part of sentence.
Create your own program. User will be prompted to input answers
for specific questions into variables.
You can ask up to 6 different questions.
Print the variables as part of a sentence.
Task 4 – Joining and printing Variables
Programming
1. You need to create a simple program to calculate two numbers together.
2. You need to create variables to store each number and the total.
3. Your program will have to allow the user to input two different numbers.
Extension 1:
Create a program to work out the area of a shape. You need to prompt the user to enter the
values of the Length and Width into appropriately names variables. The program should print
the Length, Width and Area in a sentence.
Task 5 – Calculations with inputted Variables
Extension 2:
Create a program to work out the price for your meal. Your meal includes a starter, main and a
Dessert. The program should print the price for each course of the meal and the final total.
You can include additional variables to includes drinks and tips.
Programming
1. You will be making a program to work out the employees weekly and monthly
pay.
2. You need to include suitable variables including:
1. Name
2. jobtype (part time/fulltime)
3. hours (per week)
4. payperhour
5. weeklypay = Hours * Payperhour
6. monthlypay = Weeklypay * 4
3. You need to print the following statement:
1. “Your name is . You are a employee.
2. You have worked hours this week and your pay per hour is .
3. Your weekly pay is . Your monthly pay is .
Task 6 – Employee Pay
Programming
Can you make your own
program containing
variables?
Extension
Homework: Create a program using the skills you have
learnt in this lesson.
Include variables and some type of calculation.
Programming
Plenary – Refer to the Lesson Objectives
http://www.yahmad.co.uk/
Plenary Task (Q&A)
Peer assess each other scripts.
Question: What is the purpose of variables?
Question: What are the different data types you have used in this lesson.
Objectives
Understand how to use to use Python to carry out simple calculations.
Understand the use of Variables and how to assign them values.
Understand the different data types used in Python (Int, Float, Strings).
Understand how to join and print variables statements.
Programming
Introduction to Python and Variables
http://www.yahmad.co.uk/
Objectives
Understand how to use to use Python to carry out simple calculations.
Understand the use of Variables and how to assign them values.
Understand the different data types used in Python (Int, Float, Strings).
Understand how to join and print variables statements.
Outcomes Time
Task 1 Simple Equations and Printing using the Python Shell
Task 2 Simple Equations and Printing using Variables
Task 3 Inputting Values into Variables and Printing.
Task 4 Joining and printing Variables
Task 5 Calculations with inputted Variables
Task 6 Employee Pay

More Related Content

Similar to Python Introduction Week-1 Term-3.pptx

Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsRuth Marvin
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of pythonBijuAugustian
 
Python for Physical Science.pdf
Python for Physical Science.pdfPython for Physical Science.pdf
Python for Physical Science.pdfMarilouANDERSON
 
programming_tutorial_course_ lesson_1.pptx
programming_tutorial_course_ lesson_1.pptxprogramming_tutorial_course_ lesson_1.pptx
programming_tutorial_course_ lesson_1.pptxaboma2hawi
 
Python Programming | JNTUK | UNIT 1 | Lecture 3
Python Programming | JNTUK | UNIT 1 | Lecture 3Python Programming | JNTUK | UNIT 1 | Lecture 3
Python Programming | JNTUK | UNIT 1 | Lecture 3FabMinds
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonRanjith kumar
 
Programming of c++
Programming of c++Programming of c++
Programming of c++Ateeq Sindhu
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++KurdGul
 
CrashCourse: Python with DataCamp and Jupyter for Beginners
CrashCourse: Python with DataCamp and Jupyter for BeginnersCrashCourse: Python with DataCamp and Jupyter for Beginners
CrashCourse: Python with DataCamp and Jupyter for BeginnersOlga Scrivner
 

Similar to Python Introduction Week-1 Term-3.pptx (20)

Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loops
 
Python programming
Python programmingPython programming
Python programming
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
 
Python for Physical Science.pdf
Python for Physical Science.pdfPython for Physical Science.pdf
Python for Physical Science.pdf
 
Python PPT.pptx
Python PPT.pptxPython PPT.pptx
Python PPT.pptx
 
programming_tutorial_course_ lesson_1.pptx
programming_tutorial_course_ lesson_1.pptxprogramming_tutorial_course_ lesson_1.pptx
programming_tutorial_course_ lesson_1.pptx
 
1.Basic_Syntax
1.Basic_Syntax1.Basic_Syntax
1.Basic_Syntax
 
Python basic syntax
Python basic syntaxPython basic syntax
Python basic syntax
 
Python Programming | JNTUK | UNIT 1 | Lecture 3
Python Programming | JNTUK | UNIT 1 | Lecture 3Python Programming | JNTUK | UNIT 1 | Lecture 3
Python Programming | JNTUK | UNIT 1 | Lecture 3
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
 
GE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_NotesGE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_Notes
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Programming of c++
Programming of c++Programming of c++
Programming of c++
 
INTERNSHIP REPORT.docx
 INTERNSHIP REPORT.docx INTERNSHIP REPORT.docx
INTERNSHIP REPORT.docx
 
1. Python Turtle.pptx
1. Python Turtle.pptx1. Python Turtle.pptx
1. Python Turtle.pptx
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
CrashCourse: Python with DataCamp and Jupyter for Beginners
CrashCourse: Python with DataCamp and Jupyter for BeginnersCrashCourse: Python with DataCamp and Jupyter for Beginners
CrashCourse: Python with DataCamp and Jupyter for Beginners
 
Core python programming tutorial
Core python programming tutorialCore python programming tutorial
Core python programming tutorial
 

Recently uploaded

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 

Python Introduction Week-1 Term-3.pptx

  • 2. Spiritual ‫روحاني‬ ‫وتعالى‬ ‫تبارك‬ ‫هللا‬ ‫قول‬ : ﴿ ُ‫م‬ َ‫ك‬ْ‫ي‬َ‫ل‬ِ‫إ‬ ُ‫ه‬‫ا‬َ‫ن‬ْ‫ل‬َ‫ز‬ْ‫ن‬َ‫أ‬ ٌ‫اب‬َ‫ت‬ِ‫ك‬ َ‫و‬ ِ‫ه‬ِ‫ت‬‫ا‬َ‫ي‬‫آ‬ ‫وا‬ُ‫ر‬َّ‫ب‬َّ‫د‬َ‫ي‬ِ‫ل‬ ٌ‫ك‬َ‫ار‬َ‫ب‬ َ‫َّر‬‫ك‬َ‫ذ‬َ‫ت‬َ‫ي‬ِ‫ل‬ ِ‫ب‬‫ا‬َ‫ب‬ْ‫ل‬َ ْ ‫اْل‬ ‫و‬ُ‫ل‬‫و‬ُ‫أ‬ ﴾ [ ‫ص‬ : 29 ] God Almighty said: “(This is) a Book (the Qur’an) which We have sent down to you, full of blessings that they may ponder over its Verses, and that men of understanding may remember. [Saad:29]
  • 4. Learning objective- 1. To know about the programming 2. To know how to open IDLE. 3. To know about the Command prompt, python shell and the statement 4. To know how to print the simple message on python shell. 5. Understand how to use Python to carry out simple calculations. Outcomes Time Task 1 Simple printing any message on the python shell. Task 2 Simple Equations and Printing using the Python Shell
  • 5. What is programming- PROGRAM- Program is using a set of instructions to tell a computer how to perform a task. All of the programs and applications on computers have to be written by people, who use programming language , such as Python. Extension Task- Search on google and make a list of different programming languages.
  • 6. Opening IDLE In order to use Python you’ll need to open an application on your computer that can run python. One of the applications used for writing and editing python programs is called IDLE. IDLE - Integrated Development and Learning Environment. IDLE is the standard Python development environment.
  • 7. Returning to your first Python program Command Prompt- The >>> is called the command prompt as it is prompting you to give an instruction or command. Python Shell- The window into which you type the commands is called a python shell. Statement- A statement is a single instructions of python code.
  • 8. Programming Task 1 – Simple Equations and Printing using the Python Shell Enter the following Equations into the Python Shell. The Python Shell will work as a calculator to work out the values. Using the slash (/) will work out the divided value – 10.4 / % Using the slash (%) will work out the remainder – 2 Use the Print command to introduce yourself to Python. The print command will return the values in speech marks in the brackets. (“ “) print
  • 9. Activity Task Q1. By using python shell print the following statement. “Space” “A really big place” “That contain a lot of stuff” “And a lot of nothing between the stuff.” “This is why it is called space.” “This definition of space is stupid.”
  • 10. Programming Task 1 – Simple Equations using the Python Shell Python will follow the BODMAS order of operations to complete calculations. Enter the following Equations B: Work out the contents in the Brackets first. O: Exponents/indices have second priority (Powers and Roots) AS: Last are Addition and Subtraction DM: Division and Multiplication are next
  • 11. Activity Task- By using python shell enter the following equations and run it.
  • 12. Programming Task 2 – Simple Equations and Printing using Variables 1) Click on File >> New File 2) Write the program below and then Run Module. 3) Write the program below and then Run Module. Variable: Placeholder to store values which can be called upon later in the program Print: Will print a statement placed in brackets STR: Datatype for a Text String INT: These values are being stored as Integers Integer values (int) need to be converted into a text string (str). + Join parts of text string Assigned Variables
  • 13. Programming 1. You need to create a simple program to enter data into variables. 2. You will be required to print each variable. STR: Data type for a Text String (Default Data type – “hello”) INT – Data type for Integer values (5, 665, 4545, 54, 565) Float – Data type for decimal numbers (4.5, 5.66, 65.6) INT Float Task 3 – Inputting Values into Variables and Printing.
  • 14. Programming 1. You need to create a simple program to enter data into variables 2. You will then print the variables as part of sentence. Create your own program. User will be prompted to input answers for specific questions into variables. You can ask up to 6 different questions. Print the variables as part of a sentence. Task 4 – Joining and printing Variables
  • 15. Programming 1. You need to create a simple program to calculate two numbers together. 2. You need to create variables to store each number and the total. 3. Your program will have to allow the user to input two different numbers. Extension 1: Create a program to work out the area of a shape. You need to prompt the user to enter the values of the Length and Width into appropriately names variables. The program should print the Length, Width and Area in a sentence. Task 5 – Calculations with inputted Variables Extension 2: Create a program to work out the price for your meal. Your meal includes a starter, main and a Dessert. The program should print the price for each course of the meal and the final total. You can include additional variables to includes drinks and tips.
  • 16. Programming 1. You will be making a program to work out the employees weekly and monthly pay. 2. You need to include suitable variables including: 1. Name 2. jobtype (part time/fulltime) 3. hours (per week) 4. payperhour 5. weeklypay = Hours * Payperhour 6. monthlypay = Weeklypay * 4 3. You need to print the following statement: 1. “Your name is . You are a employee. 2. You have worked hours this week and your pay per hour is . 3. Your weekly pay is . Your monthly pay is . Task 6 – Employee Pay
  • 17. Programming Can you make your own program containing variables? Extension Homework: Create a program using the skills you have learnt in this lesson. Include variables and some type of calculation.
  • 18. Programming Plenary – Refer to the Lesson Objectives http://www.yahmad.co.uk/ Plenary Task (Q&A) Peer assess each other scripts. Question: What is the purpose of variables? Question: What are the different data types you have used in this lesson. Objectives Understand how to use to use Python to carry out simple calculations. Understand the use of Variables and how to assign them values. Understand the different data types used in Python (Int, Float, Strings). Understand how to join and print variables statements.
  • 19. Programming Introduction to Python and Variables http://www.yahmad.co.uk/ Objectives Understand how to use to use Python to carry out simple calculations. Understand the use of Variables and how to assign them values. Understand the different data types used in Python (Int, Float, Strings). Understand how to join and print variables statements. Outcomes Time Task 1 Simple Equations and Printing using the Python Shell Task 2 Simple Equations and Printing using Variables Task 3 Inputting Values into Variables and Printing. Task 4 Joining and printing Variables Task 5 Calculations with inputted Variables Task 6 Employee Pay