+ 1
Taking string as Input using python idle software
Getting below error: using python idle software Taking string as Input guess=input("Enter:") Enter:hello Traceback (most recent call last): File "<pyshell#72>", line 1, in <module> guess=input("Enter:") File "<string>", line 1, in <module> NameError: name 'hello' is not defined I am not getting this error in solo learn python app.
13 Respuestas
+ 2
Download python latest v from here
https://www.python.org/downloads
+ 1
Simply, write this in IDLE
guess = input('Enter: ')
And output would be
>>> Enter: # Enter your input here
# In python 3.2.7
0
what should I give? I have given hello as my input. so iam getting the error. if I give "hello" in quotes then I am not getting any error. Any idea why slun sololearn I am not getting any error without quotes?
0
Still getting the same error. Can any one please explain why i am getting this error?
guess=input("Enter name \n")
Enter name
hello
Traceback (most recent call last):
File "<pyshell#89>", line 1, in <module>
guess=input("Enter name \n")
File "<string>", line 1, in <module>
NameError: name 'hello' is not defined
0
https://code.sololearn.com/cnJmCWokCd6y/#py
0
thats what it not working in python idle. Can you check in python idle with the same snippet
0
I am using Python 2.7 is that because of this?
0
oops very big difference between these 2 versions I guess.. very bad. thanks
0
still the same error in 2.7
0
seems its a version difference causing the error
0
is Python 3 free?
0
excellent raw_input is working. Saviour!!