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 trialStefan Vaziri
17,453 PointsNot working
This seems to work on my console and gives me "False" but I keep on getting an error message on here. What am I doing wrong here?
admitted = True
age = 10
if age >= 13:
print("True")
else:
print("False")
5 Answers
Haider Ali
Python Development Techdegree Graduate 24,728 PointsHi, It does not ask you to create the age
variable. Also, Instead of printing True
and False
you have to change the value of admitted
to True
or False
depending whether age is greater than 13 or not.
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
Andrey Chernykh
Courses Plus Student 2,552 PointsI'm going to create a variable named age.
I need you to make an if condition that sets admitted to True if age is 13 or more.
You don't have to print anything you just need to set admitted to True or False
admitted = None
age = 10
if age >= 13:
admitted = True
else:
admitted = False
Anish Walawalkar
8,534 Pointsthis should fix it:
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
Stefan Vaziri
17,453 PointsI was looking at the other dude's response since he responded before you. Was able to figure it out. Thanks.
naiara gonzalez
16,778 PointsThis worked for me: admitted = None age = 14 if age >= 13: admitted = True else: admitted = False
naiara gonzalez
16,778 Pointsnaiara gonzalez
16,778 Pointsadmitted = None age = 14 if age >= 13: admitted = True else: admitted = False