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

What's wrong with my code

I don't what's wrong, it says that there was no 'if' in my code

conditions.py
age = 14
admitted = age

if admitted > age:
  print("True")

2 Answers

Carlos Federico Puebla Larregle
Carlos Federico Puebla Larregle
21,074 Points

In the code challenge it says that he is going to create the variable "age" for you, so you don't need to create it. And if the "if" condition passes, you have to set the "admitted" variable to "True". Here's a way to do that:

admitted = None
if age >= 13:
    admitted = True

I hope that helps a little bit.

Oh, okay I get it now, thanks