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

Syntax error

if age <= 6: I keep getting a syntax error. I followed Mr. Craig exactly to a T so I'm not sure if this is a support issue or what.

Steven Parker
Steven Parker
231,269 Points

It might be that the error is on a different line, but we'd need to see the rest of the code to tell. Take a look at this video about Posting a Question, and perhaps also this one about sharing a snapshot of your workspace.

1 Answer

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 28,720 Points

Could be a number of reasons this is counted as an error. Share your code and we can comment further.

Two common problems would be:

  1. variable name not assigned.

  2. an error with indentation

Thank you for your help. I wasn't aware of how to share my code when initially asking my question. It ended up being an error with the indentation. I scraped the code and started over again and then played around with the indentation until it finally worked. Someone left instructions on how to upload code with the question so I'll be sure to do that going forward.