Loading ARcademy...
TrueFalseThe else statement provides the alternative path.
score = 40
if score >= 50:
print("You passed!")
else:
print("You failed. Try again.")
Since score >= 50 is False, Python runs the else block.
if and else WorkThink of the logic like this:
Condition is True → run if block
Condition is False → run else block
Only one of these blocks runs.
age = 16
if age >= 18:
print("You can vote")
else:
print("You are not eligible yet")
if and else help your program make decisions based on conditions.