0Pricing
Coding for Kids · Lesson

Choosing with if

Run code only when something is true.

Making a Choice 🤔

Hello, decision maker! 🧠 Sometimes code needs to choose what to do. Like: IF it is raining, take an umbrella! ☔

The if Word 🪧

In Python we use the word if to make a choice. If something is true, the code inside runs!

age = 10
if age > 5:
    print("You are a big kid!")

All lessons in this course

  1. Choosing with if
  2. The else Backup Plan
  3. Comparing Values
  4. More Options with elif
← Back to Coding for Kids