Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My 1st Program
#1
I need help in this simple program! I don't know why I'm getting this error! I'm new to python!

This is what I typed:

print ('WHAT IS YOUR NAME?')
name = input()
print (name)
This was the result:

Output:
WHAT IS YOUR NAME? kevin
Error:
Traceback (most recent call last): File "C:/Python27/pye.py", line 2, in <module> name = input() File "<string>", line 1, in <module> NameError: name 'kevin' is not defined
WHAT IS WRONG HERE?
Reply


Messages In This Thread
My 1st Program - by ineedhelp - Jan-26-2018, 07:49 AM
RE: My 1st Program - by buran - Jan-26-2018, 07:55 AM

Forum Jump:

User Panel Messages

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