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

Yusuf Cattaneo
Yusuf Cattaneo
522 Points

What is causing the error here?

A little lost here

conditions.py
age = 15
if age >= 13 
        admitted = true

2 Answers

Three errors:

  • There is no colon after the if age >= 13 line of line.
  • true isn't the same thing as True. Capitalization matters in Python.
  • The challenge made the age variable behind the scenes. You shouldn't make the variable. It will just confuse the challenge.

If you fix all of these, you should pass :smile:


I hope this helps :grin:

Happy Coding! :tada:

:dizzy: ~Alex

Yusuf Cattaneo
Yusuf Cattaneo
522 Points

Thanks for your help Alexander I really apprecaite it

No problem :)

Can you provide a Best Answer so that this question is marked as Answered? Thank you. :smiley:

:dizzy: ~Alex