+30 XP
Lesson 25

Nested Conditionals

If inside if!

layers

Decisions Inside Decisions!

You can put an if statement inside another if statement!

Real Life Example:

IF you have money

IF the store is open

THEN buy ice cream!

if has_money:
    if store_open:
        print("Buy ice cream!")
              

The inner if only runs if the outer if is True!