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

Ruben WhyDoILoseFocus
Ruben WhyDoILoseFocus
688 Points

What does it mean when Treehouse says Task 1 no longer passing.?

I don't understand why task #1 is no longer passing. Thanks in advance.

conditions.py
admitted = None
if age > 10:
    admitted = True
    print(admitted)
else age <= 15:
    admitted = False

Hi Ruben,

That type of error usually means that you've made an error on your current task which is not letting task 1 pass anymore. In this case, Alexander pointed out the error. You can only have conditions with if and elif

Also, the condition for task 1 was supposed to be if the age is greater than or equal to 13.

Tagging Kenneth Love , task 1 is passing with the condition age > 10

1 Answer

The else clause shouldn't take a condition.

The else clause automatically gets called if the if condition's value isn't true.

It will just cause an error :)

Try removing the condition from the else clause.

Good luck! ~alex