I am not that really new in Programming but in Python I am really a newbie, and so when I started learning Python from the tutorials they encouraged me to use the IDLE edito
IF you have copy-pasted the code from a CHM / PDF file then be aware of the quotes. What appears as single / double quotes in the pdf is not treated as quotes in the text editor/shell etc.
type out the code on the py shell. it should work!