โฑ๏ธ Do It Now
Create a OneNote Page
Copy both the title and DIN task – then complete the DIN task:
Y7 โ AU1.5 โ Nested Conditional Sequences (1)
| ๐ Do It Now |
| Answer each of the following: (1) Identify what each of these relational operators do == <= > != >= (2) Explain how branched conditional sequences differ from simple conditional sequences. Use key terms / command words to support your explanation |
๐ Lesson Slideshow
๐ Lesson Activities
- Activity 1
- Activity 2
- Extension
โจ๏ธ Activity 1 – Analysing A Sequence
Analyse this code and then complete a table to present all possible scenarios in OneNote
age = input("Enter your age: "))
age = int(age)
member = input("Are you a member? (yes/no): ")
voucher = input("Do you have a voucher? (yes/no): ")
if age >= 13:
if member == "yes":
print("Free entry")
else:
if voucher == "yes":
print("ยฃ2 entry fee")
else:
print("ยฃ5 entry fee")
else:
print("Not old enough")โจ๏ธ Activity 2 โ Create A Nested Conditional Sequence
Run the code in the terminal simulator below
Create this program, in Python, in the file: AU1.5 Activity 2
โจ๏ธ Extension Activity
Create a file called: AU1.5 Extension
Recreate this program in the file and screenshot the result into OneNote