I'm using Zed Shaw's Learn Python the Hard Way.
In exercise 11, the code produces an EOF
error on line 2. Here is the code:
1 print "How old are you?",
2 age = raw_input()
3 print "How tall are you?",
4 height = raw_input()
5 print "How much do you weigh?",
6 weight = raw_input()
7 print "So, you're %r old, %r tall and %r heavy." % (
age, height, weight)
I have searched StackOverflow, Google, and Hacker News forum. I could not find any answer that (a) solved this problem and (b) I could understand.
I am using the python compiler on ideone.com (have also tried two other on-line compilers and neither worked).
(Read this but could not apply it: Python EOF Error in raw_input()).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…