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 Python Basics (2015) Logic in Python Conditional Value

Wesam Asiri
Wesam Asiri
3,859 Points

if challenge

I have worked on my code and it keeps tell my that no longer pass I don't what's wrong with the code

any help would be great

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

else:
    admitted = False 

1 Answer

Stuart Wright
Stuart Wright
41,119 Points

Your code is correct. You simply need to remove this line to get it to pass the challenge:

age = 5

This is the type of line you would add while testing your code to make sure it works, but in challenges, you should never include anything that you aren't specifically asked for. Think of it this way:

Treehouse will be checking your code to make sure it gives the correct solution. They have probably defined some values for the age variable internally to run it through your code, and when you change that value, it messes with that.