SyntaxError: expected an indented block (Python) [closed]

This is how the code should look:

def the_math_sample():
    if 9 + 12 == 10 and not 2 < 5 or 5 != 5:
        pass
    elif 2 < 5 or 5 != 5:
        print('Happy Days')
    else:
        print('False example')

When you start a if statement, you have to have something nested inside of it. The pass keyword just means “don’t do anything”.

Leave a Comment