Python Python Basics Types and Branching Use an if

Boitumelo Motlhabai
Boitumelo Motlhabai
203 Points

i have a problem with adding a branch

branching.py
favorite_color = input("What is your favorite color?")
if favorite_color == "blue":
print("you must love the sky!")    

1 Answer

Steven Parker
Steven Parker
182,438 Points

A statement controlled by an "if" must be indented more than the "if" itself:

if favorite_color == "blue":
    print("you must love the sky!")