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

Keep Showing That( invalid syntax (<string>, line 3) ) In my code challenge please help me with this.

Can someone please explain me what I really need To do In this Code Challenge. I did't Understand properly What to do.

conditions.py
admitted = None
admitted = True
if age >= 13

2 Answers

Niklas Khor
Niklas Khor
1,695 Points

admitted = None

if age >= 13: admitted = True else: admitted = False

Niklas,

Outright answers without explanation should not be posted. You can either give hints or explain any code that you're posting.

Thanks

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! I feel like you're pretty close here so I'm going to leave some hints.

  • The if statement should end with a colon :
  • Do not remove the first line
  • Move the second line inside of your if statement block. When I say inside I mean below and indented.

Hope this helps, but let us know if you're still stuck! :sparkles:

Thanks For The Explanation