Incognition logo
Home
Learn
Practice
Leaderboard
0
VisualizationsPython Fundamentals

If/Else Decision Flow

Click a grade check to flip it True or False and watch one path light up. Python stops at the first True check; if none is True, else runs.

True
False
print("Grade: A")
True
False
print("Grade: B")
True
False
print("Grade: C")
else
print("Grade: F")
Customize
Code (if / elif / else — indent to nest, e.g. "if x:" on its own line followed by an indented block)