Python Python Basics (2015) Logic in Python Conditional Value

Dolapo Sekoni
PRO
Dolapo Sekoni
Pro Student 1,431 Points

keep getting syntax error, couldn't figure it out. please help

couldn't figure why it wont run. please help

conditions.py
admitted = None
if age >= 13:
    admitted = True
    else:
        admitted = False

1 Answer

Alex Koumparos
MOD
Alex Koumparos
Python Web Development Treehouse Moderator 31,929 Points

Hi Dolapo,

The problem is with your indentation. Your else statement should always be at the same level of indentation ad the corresponding if statement. That's how Python knows that this particular else belongs to that particular if.

Cheers

Alex