If and Nested Statements
If and Nested Statements
Programming
http://www.yahmad.co.uk/
Unit Overview
Objectives
Understand why computer programming scripts are used.
Understand the use of Variables as place holders for information.
Understand the use of if and nested if statements in Python Programming.
Programming
Outcomes Time
Task 1 Job Type
Task 2 Stock Level
Task 3 Sales Target
Task 4 Employee Pay
Task 5 Grades
Task 6 Extension
http://www.yahmad.co.uk/
IF/Nested Overview
1. Simple script to work whether employees are part time or fulltime.
2. Logical Test: Worked Hours less than 15
3. True: “You are a part time employee”
4. False: “You are a full time employee”
Programming
Logical Test
IF Statement: True
IF Statement: False
Logical Test
1. IF Statement: True
2. IF Statement: True
IF Statement: False
Task 1 – Job Type
1. Create a simple script to work whether employees are part time or fulltime.
2. Logical Test: Worked Hours less than 15
3. True: “You are a part time employee”
4. False: “You are a full time employee”
Programming
http://www.yahmad.co.uk/
Task 2 – Stock Level
1. Create a simple script to work the reorder amount for the Maze Runner Book.
2. Logical Test: Stock Level <1, True: “reorder 20”
3. Logical Test: Stock Level <5, True: “reorder 15”
4. Logical Test: Stock Level <10, True: “reorder 10”
5. False: “Fully Stocked”
Programming
Task 3 – Sales Target
5. False: Sales = 25
http://www.yahmad.co.uk/
Task 4 – Employee Weekly Pay
http://www.yahmad.co.uk/
Task 5 – Grades
http://www.yahmad.co.uk/
Task 6 - Extension
http://www.yahmad.co.uk/
Plenary – Refer to the Lesson Objectives
Objectives
Understand why computer programming scripts are used.
Understand the use of Variables as place holders for information.
Understand the use of if and nested if statements in Python Programming.
Programming
http://www.yahmad.co.uk/