Learn
Conditionals & Control Flow
Else Problems, I Feel Bad for You, Son...

The else statement complements the if statement. An if/else pair says: “If this expression is true, run this indented code block; otherwise, run this code after the else statement.”

Unlike if, else doesn’t depend on an expression. For example:

if 8 > 9: print "I don't get printed!" else: print "I get printed!"

Instructions

1.

Complete the else statements to the right. Note the indentation for each line!

Folder Icon

Take this course for free

Already have an account?