Profile image of saiavinash
Submitted by saiavinash
over 10 years

Why this is not working in Python 3.4?

a=raw_input(“What is ur name”) Traceback (most recent call last): File “<pyshell#43>”, line 1, in

What does it mean..??

Answer 535ba57f52f86373e30012ce

1 vote

Permalink

In Python 3.x, input() replaces raw_input(), for input from the console. It returns the user’s response a string, so when an int or a float is needed, it is necessary to convert the returned value from the str type using int() or float(). Also remember to use the print() function with Python 3.4, including parentheses, for output to the console, instead of the old print command that did not require parentheses.

Profile image of AppylPye
Submitted by AppylPye
over 10 years

Answer 54ef706f86f552abb3002629

1 vote

Permalink

for python 3.4 (which is what i use) we no longer use “raw_input” instead we just do “input” so the code would look something like this: a = input(“What is your name”)

Profile image of trehnert
Submitted by trehnert
over 9 years