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

Mo B
PLUS
Mo B
Courses Plus Student 493 Points

Help please

Hi I've been trying to solve this one and I can't seem to figure it out. Can anyone help? Thanks in advance

conditions.py
admitted = None

3 Answers

admitted = None
if age > 13:
  admitted = True
Cindy Lea
Cindy Lea
Courses Plus Student 6,497 Points

I believe its : if age >- 13:

The challenge says 13 or more.

You're right my bad, I didn't read it correctly.

Steven Parker
Steven Parker
231,269 Points

I doesn't look like you've written any code yet. You should at least give it a try. And this is pretty fundamental. You may want to re-watch the If This Then That video that immediately precedes this challenge.

But the idea is to create a check using if in task 1, and extend it using else for part 2. If you're really stuck, here's an example:


:warning: SPOILER ALERT


admitted = None
if age >= 13:           # <- These 2 lines are for task 1
    admitted = True
else:                   # <- These 2 lines are for task 2
    admitted = False