Lesson 8 of 12

If / Elif / Else ❓

🎯 Grades 6–8 ⏱ ~25 minutes 💚 Intermediate

What You'll Learn

  • Write if/elif/else statements to make decisions
  • Use comparison operators: ==, !=, >, <, >=, <=
  • Understand that indentation defines code blocks
Quick Check

1. How many spaces are used for indentation in Python?

A2 spaces
B8 spaces
C4 spaces (or 1 Tab)

2. What does == mean in Python?

AAssign a value
BCheck if two things are equal
CGreater than or equal

3. Which runs when all if and elif conditions are False?

Aelif
Belse
Cthen

4. In an if/elif/else chain, how many branches actually run?

AAll of them
BAt most one
CAll that are True