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 Comparison Solution

Sakinah McCoy
Sakinah McCoy
471 Points

Challenge.py syntax error for user name

https://w.trhou.se/0zkannfbc1

Hello, I appreciate any help in advance!!! I'm getting a syntax error: invalid syntax for line 11. This current string is what I changed it to after I originally got the error. The string at first was similar to line 12. I already played around with the indentation with both lines and nothing worked.

1 Answer

Steven Parker
Steven Parker
216,810 Points

The problem is actually on line 5 where the parentheses are unbalanced. There needs to be one more closing parenthesis at the end of the line.

The system doesn't detect the problem until it encounters the next statement (on line 11).

Sakinah McCoy
Sakinah McCoy
471 Points

Thank you, Steven. You are getting me together. I was able to add my code to my question this time thanks to you, also. You're a lifesaver. I was working on that code for hours.