Hi all...I am using python 3.2 ...there is an error when i type raw_input it says not defined...anyone have a clue??? thanks
maybe your variable is not defined...
>>> x = raw_input (" enter youe first name ") Traceback (most recent call last): File "<pyshell#29>", line 1, in <module> x = raw_input (" enter youe first name ") NameError: name 'raw_input' is not defined
you must declare your variable first, maybe x as string
>>> "x" = raw_input ("enter your first name " ) SyntaxError: can't assign to literal how to do that please.
In python3.2 you can simply write x=input('Enter your first name\n') and if you need integers, y=int(input('Your age\n'))
Yes it worked...thanks a lot
If you are going to use 3.x instead of 2.x as the course instructions stipulated you should be prepared to figure out the differences between 3.x and 2.x ... 3.x is NOT backward compatible
Join our real-time social learning platform and learn together with your friends!