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) Letter Game App Letter Game Introduction

John Faires
John Faires
1,361 Points

I am getting a syntax error for a line that is exactly as it appears in the video, please HELP me figure out why.

I am getting a syntax error for the colon at the end of the line 27 code. It appears to be exactly as Kenneth writes it on the video.

while len(bad_guesses) < 7 and len(good_guesses != len(list(answer)):

You can check out a snapshot of the work space here: https://w.trhou.se/o0xs5rqfp1 file is letter_game.py

Thanks for helping!

2 Answers

Zachary Kaufman
Zachary Kaufman
1,463 Points

It's been a while since I did this, but shouldn't it be while len(bad_guesses) < 7 and len(good_guesses) != len(list(answer):

i don't get it sorry could you explain why? wouldn't that leave a missing parenthesis? i see that he missed a closing parenthesis off in his, but haven't you now done too? im confused :s

John Faires
John Faires
1,361 Points

Thank you! It is amazing how many times you can look something over, and still miss something like that. I appreciate your help.

Zachary Kaufman
Zachary Kaufman
1,463 Points

Haha no problem, happens to me all the time. Good luck with your classes :)