Courses/Control Flow

๐Ÿ”€ Control Flow

if / elif / else

Make decisions in your code.

Conditionals run different code based on whether something is true. Python uses indentation (4 spaces) to group code blocks โ€” no braces.

score = 85
if score >= 90:
    print("A")
elif score >= 80:
    print("B")
else:
    print("Keep going!")
main.py
Output
Press Run to execute.
Expected output
You can vote.

Sign in to track your progress across lessons.