calthoff / self_taught

This repository contains the exercises for "The Self-Taught Programmer: The Definitive Guide to Programming Professionally."
http://theselftaughtprogrammer.io
272 stars 226 forks source link

Invalid syntax error #5

Closed mikebriones closed 7 years ago

mikebriones commented 7 years ago

Running into an issue on: https://github.com/calthoff/self_taught/blob/master/python_ex74.py where after I type in 'if x % 2 == 0:' I get a syntax error. When I copy and paste, all the code, I get an error saying 'SyntaxError: invalid syntax' and the if from that line is highlighted. The only way I can get that line to work is by copying and pasting just that line. Any idea why this is happening?

calthoff commented 7 years ago

@mikebriones I just retested that example. Worked fine on my end. I am not sure what is happening. Make sure your spacing is correct (4 spaces). If you are still stuck, please send a Git Gist with your code in it.