# basics conditionals

Flipping with not

not flips True to False, and False to True:

is_raining = int(input()) == 1
if not is_raining:
    print("Let's go outside!")
else:
    print("Let's stay in.")

If is_raining is False, then not is_raining is True, so the first message prints.

Your turn: the code to read is_raining is given. Print Let's go outside! if it is not raining, otherwise print Let's stay in.

💡 need a hint?

pyb-cond-not.py🔒 given lines are locked — write your code in between
loading...