Conditions: if, then, else - Learn Python 3 - Snakify

Lesson 3. Conditions: if, then, else




5/15. If and else: theory



To sum up, the conditional statement in Python has the following syntax:
if condition:
    true-block
    several instructions that are executed
    if the condition evaluates to True
else:
    false-block
    several instructions that are executed
    if the condition evaluates to False

day = input()
if day == 'Monday':
    print('Such a hard day.')
    print('I wish there were no alarm clocks.')
else:
    print('Moderate day.')
    print('Could be worse.')