Knowledge organisersSelection
Multi-branch decision making.
elif (else if) lets you check multiple conditions in sequence. Python checks each one top-to-bottom and runs the first branch that is True, then skips the rest.
elif adds extra conditions after ifelse at the end catches everything not matchedscore = int(input("Score: "))
if score >= 90:
print("A")
elif score >= 70:
print("B")
elif score >= 50:
print("C")
else:
print("Fail")