Profile image of saiavinash
Submitted by saiavinash
over 11 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 11 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 10 years

Popular free courses

  • In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.
    • Beginner Friendly.
      4 Lessons
  • Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.
    • Beginner Friendly.
      11 Lessons
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      6 Lessons
Explore full catalog