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
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.
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