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 trialmohit jain
1,060 PointsCode error
for the first if else exercise I'm using the following code, But its throwing an error "Admitted not set to False"
age = 32 admitted = None
if age >= 13: admitted = True else: admitted = False
Could you please help
age = 32
admitted = None
if age >= 13:
admitted = True
else:
admitted = None
2 Answers
Mustafa Dilaver
12,671 PointsIn first Challenge Task it says,
I'm going to create a variable named age.
so you don't need to define age variable again. It is pre-defined for you.
admitted = None
if age > 13:
admitted = True
else:
admitted = False
mohit jain
1,060 Pointsyep figured that. Schoolboy error :). Thanks.