Knowledge organisersBoolean Expressions
Convert rules to Boolean.
Converting English rules into Boolean expressions is a key GCSE skill. Break the rule into parts, identify the comparisons, and connect them with and/or/not.
x >= 10 and x <= 20age < 5 or age > 65not name == "" or len(name) > 0# Rule: "Pass if score is 50 or above AND attended > 80%"
score = 65
attendance = 85
if score >= 50 and attendance > 80:
print("Pass")