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 trialRicky Ackerman
705 Pointswhenever a variable name = None i get thrown off. How do I set it to True
admitted = None if age >= 13: print(admitted)
admitted = None
if age >= 13:
print(admitted)
1 Answer
allensimbul
3,065 PointsSorry, I don't understand the question, what is it that you want to do? Also more context on the question would be great :)
Ricky Ackerman
705 PointsSorry, forgot to add the question. Challenge Task 1 of 2
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.
allensimbul
3,065 PointsKay i got you. admitted = None admitted is None True age = 13 if age >= 13: ... admitted == None ... else: ... admitted != None ... True
Regarding what you written here, if the question wants you to set admitted to True then why are you using == to None once you state the condition age >= 13 just write admitted = True
Ricky Ackerman
705 PointsRicky Ackerman
705 Pointswhen I do the following in workspaces it works, but I can't pass the challenge. Help please