I am currently learning Python out of a book, gearing up for classes starting in January. I wanted to get a jump start on some programming just to get my feet wet, and to see how things work. I am using the book called "Python Programming for the absolute beginner" 3rd edition. I downloaded python 3.1 from their companion site so I would be sure to have to version they used in the book.
Since starting, I have noticed a few quirks. For example, I wrote a program from the book that was to display the words "Game Over" written in slashes. The program worked fine for the "Game" part, but broke up the word "OVER" for some reason. After fiddling with it, I realized that the last bit of the "R" ended in \. Apparently the program didn't like it, so it messed up the whole word. I solved this by making an exclamation point at the end of the word "over", so the end of the row was | instead of \. NO big deal really, I mean how many times do you end up programming something with a slash at the end?
Now, a more annoying quirk has popped up. Apparently, there is some strange syntax problem with break statements in loops. I copied a code out of the book that was supposed to count from 0 to 10 and if count>10, the program would break and give users the option to leave the program. Well, IDLE keeps yelling at me that break is "outside of the loop". I tried random things to see if I could get this or that little change to work, shifting the line, putting the command inside parenthesis, all sorts of junk that I figured probably wouldn't work.
My husband thinks it has something to do with the AMD processor on my machine. It is a laptop with WIN8, but this also happens on my Win7 desktop. All of our machines have AMDs of various generations. Does anyone know what is up with these weird quirks? Did I snag a different version of python or is my processor messing with this stuff? I want to figure this out, cuz it is driving me nuts!
Last edited by Mekire
on Wed Oct 09, 2013 12:55 am, edited 1 time in total.
Reason: First post lock