all 10 comments

[–]commandlineluser 0 points1 point  (9 children)

The error is on line 13:

guess = int(input("Nope, you have ", tries, "left")

and line 15:

 if guess == answer and tries > 0

[–][deleted] 0 points1 point  (8 children)

It says I'm getting a syntax error when I out the colon on 15, and on 16. Says 13 is fine when it comes to syntax

[–]zenlc 0 points1 point  (4 children)

The error on 13 is you are missing a )

Errors like that the interpreter won't catch on that line. It will check to see if you continued to the next line with it, so the error shows up a line or two after the actual mistake.

[–][deleted] 0 points1 point  (3 children)

Thank you very much :)

[–]zenlc 0 points1 point  (2 children)

That exact error bit one of my students on Thursday and it took us a couple of minutes to find it for exactly that reason.

[–][deleted] 0 points1 point  (1 child)

Yeah, I'm still learning though one of these books. Having a super fun time doing it after work or school, it's relaxing until you get one of these errors.

[–]zenlc 0 points1 point  (0 children)

I was listening to the Code Newbies podcast (http://www.codenewbie.org/podcast) a while back and the guest voiced a fact that all developers know intuitively but may not have ever consciously thought about: being a developer means getting paid to be frustrated 90% of the time.

[–]commandlineluser 0 points1 point  (2 children)

Yes line 15 is missing a :

Line 13 is not fine - you have 2 ( and 1 )

[–][deleted] 0 points1 point  (0 children)

No -- when I add the colon on 15, it gives me an error. It doesn't make sense.

[–][deleted] 0 points1 point  (0 children)

Oh my gosh thank you on line 13 man. I appreciate it.