On Tuesday 22 November 2016 14:10, rmjbr...@gmail.com wrote: > Hi! This is my first post! I'm having trouble understanding my code. I get > "SyntaxError:invalid syntax" on line 49.
Sometimes a syntax error can only be reported on the line *following* the line with the actual error. So you may have something like this: x = func(y # oops forgot to close the brackets for i in range(x): # error is reported here ... So when you get a syntax error on a line, and cannot see anything wrong with that line, work your way backwards until you find the actually location of the error. [...] > elif raceNum==3: > print("Nice fur. I don't see too many of your kind 'round here. Maybe > that's a good thing...") > print('') > classNum=int(input("What's your profession mate?") > > elif raceNum==4: #this line has an error for some reason This is the line where the error is reported. The error is actually on the previous line. Do you see it now? -- Steven 299792.458 km/s — not just a good idea, it’s the law! -- https://mail.python.org/mailman/listinfo/python-list