Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string name is not defined
#1
print("Enter your name:")
x = input()
print("Hello, " + x)
after compiling the program i get this following error

Enter your name:
listingpython
Traceback (most recent call last):
  File "input.py", line 2, in <module>
    x = input()
  File "<string>", line 1, in <module>
NameError: name 'listingpython' is not defined
Reply


Messages In This Thread
string name is not defined - by listingpython - Jan-17-2019, 09:29 AM
RE: string name is not defined - by buran - Jan-17-2019, 09:33 AM
RE: string name is not defined - by listingpython - Jan-17-2019, 09:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python library not defined in user defined function johnEmScott 2 3,925 May-30-2020, 04:14 AM
Last Post: DT2000
  get string how it is defined bhojendra 10 5,548 Apr-29-2019, 08:00 AM
Last Post: buran

Forum Jump:

User Panel Messages

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