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

Python Python Basics (2015) Logic in Python Conditional Value

Wes Arrington
Wes Arrington
2,289 Points

Challenge Task 1 of 2 "Conditional Value" ...make an if condition that sets admitted to True if age is 13 or more

I don't know where to start. Please help, this is the trickiest task I've come in contact with in Python Basics, I'm embarrassed cause I feel like this is probably such an easy fix.

admitted = None

conditions.py
admitted = None

2 Answers

Wes, In this challenge we accept that there is a variable named age and all you need to do is check the age. if it is greater than 13 admitted will be True

admitted = None
if age > 13:
    admitted = True
Wes Arrington
Wes Arrington
2,289 Points

Thank you soo much, it worked, I think the scenario that was given is what threw me off, as suspected I put to much thought into it, thank you for putting in the time to type that it's much appreciated it.

There's no reason to be embarrassed. Honestly, some things will come easier than others when you're learning a new language, no matter if it's code or otherwise. Smile, take a breath, walk away for a short time, then come back and dig in. Sometimes the brain just needs a few seconds to recalibrate itself, it's no biggie.

Now, as for your challenge here, it actually is a relatively simple solution, but don't let that discourage you. What the challenge wants is for you to check if age is greater than or equal to 13 and, if it is, it wants you to set admitted equal to True. The basic structure of an if statement is

if some_some_condition_we_are_checking:
    # do something

This was covered in the previous video(s) a bit, but here is a quick example of it. If you still need a bit of help after taking a peek at that link and reading what I've said so far, feel free to say something and I'll try to explain any points you're having issue with :)

Wes Arrington
Wes Arrington
2,289 Points

Wow man I could tell you good dude. The kinds soothing words were very thoughtful and did not go overlooked thank you man.