Feb-27-2020, 07:51 PM
First of all, I am new here so I am sorry if I am posting in the wrong place, and I would appreciate a link to the write place so I can perform correctly in the future.
I am learning python and have bought a book but I am confused about the 'input' command. In the book it has the code:
I am learning python and have bought a book but I am confused about the 'input' command. In the book it has the code:
name = input("Hi, what's your name? "), but when I run this and enter any response (in this case the name Sam) I get the error:
Traceback (most recent call last): File "/home/pi/Desktop/Newseession.py", line 1, in <module> name = input("Hi, what is your name? ") File "<string>", line 1, in <module> NameError: name 'Sam' is not definedAm I missing something? Thank you for any help.