I am working through the wikibooks page included with the first lecture, and to get the feel for the program I am simply entering the exact text of some of the simple programs into my python to see if I can get the program to do what the code should prompt it to. So I saved the file and opened it in a new python page but it says i have a syntax error. I don't believe I do. question = "What did you have for dinner?" print question What did you have for dinner? answer = raw_input() "You had" + answer + "! That sounds delicious!" Why can't I run this program?
Try this question = "What did you have for dinner?" print question #What did you have for dinner? answer = raw_input() print "You had " + answer + "! That sounds delicious!"
Join our real-time social learning platform and learn together with your friends!