Answer the question
In order to leave comments, you need to log in
Sublime Text3 and Python?
print('Enter your name:')
x = input()
print('Hello, ' + x)
Enter your name:
Jack
Traceback (most recent call last):
File "PY copy.py", line 2, in <module>
x = input()
File "<string>", line 1, in <module>
NameError: name 'Jack' is not defined
>>>
Answer the question
In order to leave comments, you need to log in
It looks like you are running this script in python2. In the 2nd python, raw_input is used to input strings
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question