How to input variables in python


print “How old are you?”,
age = raw_input ()

How old are you? Traceback (most recent call last):
File “C:\Users\Lenovo\Desktop\LPyTHW\”, line 3, in
age = raw_input ()
EOFError: EOF when reading a lin


What package are you using to run the code? Does it work when you run the script through the python executable using the command line?


I used ‘Atom Runner’ to run python . It worked when I used command line and ipython notebook.


It works fine in build and script. Anyway, none of these packages are REPLs, so you wouldn’t be able to input the age anyway. Could that be why atom-runner is failing, because the script never exits properly?