Knowledge organisersProgramming Fundamentals
Practical use of the techniques, Understanding of each technique
Selection allows a program to make decisions and choose different paths based on a condition. The most common forms are IF-THEN-ELSE statements and SWITCH/CASE SELECT statements. A condition is evaluated as True or False, and the program executes different code depending on the result.
True.False.elif in Python) allows multiple conditions to be checked in sequence.==, !=, <, >, <=, >=) and Boolean operators (AND, OR, NOT).if = Selection, for = Iteration, while = Iteration, switch/case = SELECTION. Students commonly misidentify switch/case as iteration.score = int(input("Enter your score: "))
if score >= 70:
print("Distinction")
elif score >= 50:
print("Merit")
elif score >= 40:
print("Pass")
else:
print("Fail")