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

Please help....

I cant figure this out. Please help me!

conditions.py
admitted = if age > 13 

2 Answers

The code should look like this, first you declare te condition and afterwards what happens when the condition has passed

admitted = None

if age >= 13:
    addmitted = True

thanks!

Anjali Pasupathy
Anjali Pasupathy
28,883 Points

The challenge doesn't want you to change the first line of code, so "admitted = None" should stay the same. Under that line, the challenge wants you to create an if statement, where the condition is "age is greater than or equal to 13", and in the body, you set admitted to True. Below is the structure of an if statement in Python:

if CONDITION: # CONDITION IS True OR False
    BODY # DO SOMETHING IF THE CONDITION IS TRUE

In this case, the CONDITION is "age is greater than or equal to 13" (age >= 13), and the BODY is where you set admitted to True (admitted = True).

I hope this helps!