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

Andreas Wassberg
5,856 PointsConditional Value - Code Challenge
Cant seem to fix this problem. Help?

Andreas Wassberg
5,856 Pointsadmitted = 1 age = 13 if admitted < age: print("True")
8 Answers

rdaniels
27,258 PointsThis will work to complete both challenges:
admitted = None
if age >= 13:
admitted = True
else:
admitted = False

Andreas Wassberg
5,856 PointsThanks!

Loren Moyer
306 Pointsnone of these answers are working for me

Ken Alger
Treehouse TeacherAndreas;
Task 1
I'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.
Great, we are provided with an age
variable, so we don't want to reassign that, but just check for it's value in our if statement. Then, if age is greater than or equal to (>=
) thirteen we want to assign admitted
a Boolean value of True
. In code that would look something like:
if age >= 13:
admitted = True
Does that make sense? Post back if you are still stuck.
Happy coding,
Ken

Loren Moyer
306 Pointsthat does not work for me

Young ki Jang
519 PointsCan anyone help me what is wrong?
admitted = None
if age >= 13:
admitted = True

Andreas Wassberg
5,856 PointsI got it! I guess it was the question itself that I didn't get. Thanks a lot!!!

Ken Alger
Treehouse TeacherYou bet.

Eric Fernandez
Python Development Techdegree Student 3,008 Pointsyup! the questions are not written correctly or I was reading it wrong.

diego cortes
1,421 PointsThanks Ken Alger, i get it now.

timoleodilo
1,438 Pointscoffee shops!!!

Tinashe Mulambo
5,817 Pointsme i still dont get it. is it possible to have a clue or a clear question in the help section.. cause searching g[for answers on google might create a reliance syndrome

Terrence Milazi
494 Pointsadmitted = None
if age >= 13:
admitted = True
else:
admitted = False

MD Sajed Arman
Courses Plus Student 327 PointsWhy isn't true under colons?
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherAndreas;
Can you post the code you have been trying?
Thanks,
Ken