-2

I have a program that takes input from the user and displays it.

name = input("What is your name?\n")
print("Hello, " + name + "!")

This program is so simple but all I'm getting back from it is

Nameerror: name "(Whatever name is input)" is not defined

What do I do?

Kiri.
  • 37
  • 4
  • 3
    Is this your entire program? It seems that a variable named "Keller" is being referenced somewhere in your code, but it doesn't exist. – MystPi May 13 '22 at 14:40
  • 3
    TL;DR: switch to executing your code using Python 3, not the now-dead Python 2. – deceze May 13 '22 at 14:42

0 Answers0