compiler errors - Trouble Running A Python Script -


here's code:

name = input("what's name? ") print("nice meet " + name + "!") 

but when enter name, example "john", gives me error:

traceback (most recent call last):   file "name.py", line 1, in <module>     name = input("what's name? ")   file "<string>", line 1, in <module> nameerror: name 'john' not defined 

the version of python i'm using "2.7.10".

you need use raw_input rather input, latter attempts evaluate enter while former keeps string.


Comments