I got a python code from some book like below, but it runs abnormally.
# name.py
name = input('What is your first name? ')
print('Hello ' + name.capitalize() + '!')
The result is:
$ python name.py
What is your first name? jack
Traceback (most recent call last):
File "name.py", line 3, in <module>
name = input('What is your first name? ')
File "<string>", line 1, in <module>
NameError: name 'jack' is not defined
What is wrong with it? Thanks!