Python Python Basics (2015) Logic in Python Conditional Value

Sean Frye
Sean Frye
1,062 Points

Huh. I'm confused.

I'm starting to wonder if I'm not cut out for coding or at least not cut out for Python. I've been asking for help on a lot of questions. I'm losing confidence. I feel like I understand everything I was instructed on during the video, but maybe there is something I forgot that I would have used during this quiz from previous lessons. I need to spend more time studying, that's for sure.
admitted = None
if age > 13:

2 Answers

Jacob Fong
Jacob Fong
3,754 Points

Hi Sean. You're really close!

The challenge asks for "greater than or equal to" 13, and you've got just a "greater than" sign.

Does that help?

Jennifer Nordell
Jennifer Nordell
Treehouse Moderator

Hi there, Sean! In addition to the answer left by Jacob FK, I'd point out that the challenge asks you to set the admitted variable to True. Right now, you're printing out the word "True", which isn't the same thing. Note that you shouldn't change the first line.

As you probably know, many systems like Steam, Facebook etc require a user to be at least thirteen years of age to use them. I believe this example is based on that principle. We're going to start out assuming that they aren't allowed to use this service until we can verify that their age is at least thirteen. If we can verify the age is 13 or older then we need to change their admitted status to True instead of None. Note that True, False, and None are reserved words in Python and not strings. These do not need quotation marks around them (unless you actually want a string with that in it).

As pointed out, you are currently allowing any user who is older than 13, but we want the 13 year-olds to be let in too!

These challenges are very specific and strict. Don't give up yet! Your syntax is spot on! The only thing I see here is a misinterpretation of the instructions. I have yet to see anything that indicates to me that you don't grasp the basic logic. I've done a lot of challenges on Treehouse. In some cases, I'm sure that what I put in was correct but still get the Bummer! In 99% of those cases, it's my failure to pay attention to the instructions that is holding me up.

Hope this helps! :sparkles: