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

sreejith Sivan
sreejith Sivan
308 Points

created a variable named age. I need you to make an if condition that sets admitted to True if age is 13 or more

how to find a solution to this qn

conditions.py
admitted = None
if age >= 13
    print(True)

2 Answers

Lamar Greene
Lamar Greene
9,581 Points

Hello Sreejith,

There are two issues I see with your code...

The first is your "if" statement is not properly declared. (What goes at the end of every "if" statement?...)

The second is that you have a print statement inside your "if" statement. The challenge is asking to assign the value of "True" to admitted if statement is true.

I hope this helps!