It should be input, not raw_input, because you use python3 (that is the right thing to do).
raw_input is python2, in python3 it is just input
As a general remark - I would expect the author of the book will ask you to run the sample code in almost all of the cases. It just happens that in this particular case they try to explain a concept and are focused on this incomplete snippet. I will leave to you to decide if this is good or bad/confusing approach.
Here is one thread and one more
raw_input is python2, in python3 it is just input
As a general remark - I would expect the author of the book will ask you to run the sample code in almost all of the cases. It just happens that in this particular case they try to explain a concept and are focused on this incomplete snippet. I will leave to you to decide if this is good or bad/confusing approach.
Here is one thread and one more
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs