Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

hi, I can't get trough this task, what am i doing wrong. thanks. The else is wrong, why?

admitted = None
age = 15
if age >=13:
    admitted = (true)
    else:
             admitted = (False)

You can use three back ticks ( ` ) followed by py to use the code block.

# Python Code Here

Also I can't see what task you are referring to as you posted directly into the community.

thanks jag, for directions ```py

1 Answer

I don't know which task are you referring but the code should look something like this:

admitted = None
age = 15
if age >=13:
    admitted = True
else:
    admitted = False

Watch out for indentation and you don't need to put True/False inside brackets when assigning to a variable.

thanks akak