I ran this same code with only a few minor differences in syntax to fit the right script mode in Python version 2.7.9 and also in Python 3.4.2
Script that I rode in Python 2:
name=input("tell me your name:")
print 'Hello',str(name),'!'
root@hikerpath:~/Área de trabalho# python teste3.py tell me your name:joao Traceback (most recent call last): File "teste3.py", line 1, in <module> name=input("tell me your name:") File "<string>", line 1, in <module> NameError: name 'joao' is not defined root@hikerpath:~/Área de trabalho#
Script that I rode in Python 3:
name=input("tell me your name:")
print("Hello",str(name),"!")
root@hikerpath:~/Área de trabalho# python3 teste2.py tell me your name:joao Hello joao ! root@hikerpath:~/Área de trabalho#
What is missing in the code I ran in Python 2, to give the string error?