I am doing the Asking Questions exercise from "Learn Python the Hard Way" 3rd edition by Zed Shaw where my code looks like:
print "How old are you?",
age = raw_input()
print "How tall are you?",
height = raw_input()
print "How much do you weigh?",
weight = raw_input()
print "So, you're %r old, %r tall and %r heavy." % (age, height, weight)
and output should look like:
How old are you? 38
How tall are you? 6'2"
How much do you weigh? 180lbs
So, you're '38' old, '6\'2"' tall and '180lbs' heavy.
However, because I am using Python 3, output initially looks like:
How old are you?
Traceback (most recent call last):
File "script.py", line 2, in <module>
age = raw_input()
NameError: name 'raw_input' is not defined
and then like once I replace raw_input() with input():
How old are you?
Traceback (most recent call last):
File "script.py", line 2, in <module>
age = input()
EOFError: EOF when reading a line