Python Python Basics (2015) Logic in Python Conditional Value

Ohad Buzaglo
Ohad Buzaglo
879 Points

I add the else properly. why it doesnt work???

I did part 1 of the question properly, but when I add the else it gives me an error.

conditions.py
admitted = Non
if age >= 13:
    admitted = True
    else:
        admitted = True
Ohad Buzaglo
Ohad Buzaglo
879 Points

i ment in the else that admitted is set to False

3 Answers

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Remember that spacing matters. The if and else should be lined up.

Try to fix the spacing and see if that doesn't fix it.

Good luck!

You misspelled 'none'. But aside from that I would suggest you take a look at the indentation of your else statement. Did that make it clear? Hope this helps, Nakal

Ohad Buzaglo
Ohad Buzaglo
879 Points

thank you guya I figured it out!

Yea! :)