Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Question
#3
(Feb-27-2020, 07:51 PM)Lighaldr Wrote: 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:
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 "https://mydataprovider.com/sites/", line 1, in <module>
    name = input("Hi, what is your name? ")
  File "<string>", line 1, in <module>
NameError: name 'Sam' is not defined
Am I missing something? Thank you for any help.

Thanks
Reply


Messages In This Thread
Python Question - by Lighaldr - Feb-27-2020, 07:51 PM
RE: Python Question - by buran - Feb-27-2020, 07:56 PM
RE: Python Question - by Lighaldr - Mar-02-2020, 08:10 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020