name = input('what is your name? ')
print('hi ' + name)
The output shows:
what is your name? John
Traceback (most recent call last):
File "/Users/xx/PycharmProjects/Tutorial/basic_tutorial.py", line 1, in <module>
name = input('what is your name? ')
File "<string>", line 1, in <module>
NameError: name 'John' is not defined
It is not working when inputting John without quotes. However, I believe the syntax is not wrong in Pycharm. Anyone knows why?