This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by saiavinash
almost 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.

points
Submitted by Glenn Richard
almost 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”)

points
Submitted by Thomas Rehnert
almost 9 years