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
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.
Submitted by AppylPye
over 10 years
Popular free courses
- Free course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner Friendly4 Lessons - Free course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner Friendly11 Lessons - Free course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner Friendly6 Lessons