if / elif / else: Coding lesson for kids
In this lesson, children learn to write an if/else block that runs different code based on a condition.
if score > 10:: Runs the indented lines below ONLY if the condition is True.
print("big"): The colon at the end of the if line is required. Then the INDENTATION — the spaces at the start of this line — is what tells Python it belongs inside the if. No braces needed.
elif score > 5:: Checked only if the "if" above was False — an extra condition to try.
else:: Runs if NONE of the above conditions were True — the fallback.
This lesson is part of Python in Coding at Pearls Valley Academy — Real code, beginner-friendly syntax.
Each lesson starts with a short narrated, animated explanation, then hands-on practice. A wrong answer gets a gentle hint, never a penalty, and children earn stars and pearls as they go.