1
I was following a little tutorial. I did everything exactly as indicated in the tutorial and gave me a variable definition error whereas in the tutorial did not give.
Can someone explain to me the mistake?
Code:
print "hello wolrd"
myName = input("what is your name?")
myVar = "hello"
print (myName)
print (myVar)
Exit:
C:\Users\Miguel\Desktop>python poop.py hello wolrd what is your name?Miguel Traceback (most recent call last): File "poop.py", line 2, in <module> myName = input("what is your name?") File "<string">, line 1, in <module> NameError: name 'Miguel' is not defined
The question is that in the tutorial when I put the name Miguel was supposed to answer with Hello and is not giving, someone can explain me sff?
Use
raw_input
instead ofinput
.– stderr
Hello and welcome. Please do not place images with your code or error output. Instead, paste the content here. This facilitates future searches and allows screen reader users to view content.
– Pablo Almeida