Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (2015) Logic in Python Conditional Value

Jonathan Camacho
Jonathan Camacho
1,504 Points

"Bummer! invalid syntax (<string>, line 1)", how do I fix this?

I changed 'None' to 1 to see if I could get admitted to be True, but the error still remained. How do I fix the error?

conditions.py
admitted = 1
if age >= 13
    admitted = True
Steven Parker
Steven Parker
216,083 Points

That's not the issue.

And you already asked about this issue and I have answered you there.

But hey, it's much easier to read with the auto-formatting applied by the challenge. :wink:

You can delete this duplicate question.

1 Answer

igsm '
igsm '
10,440 Points

You have a syntax error. Perhaps, you have forgotten something? See documentation: https://docs.python.org/3.6/tutorial/controlflow.html

Steven Parker
Steven Parker
216,083 Points

igor sm — Jonathan won't be able to remove this redundant question if it has an answer. You'll need to remove your answer first.