Python Newbie here (First day learning).
I'm using Python 2 and using the following if statement code:
meaty = input('Do you eat meat? (y/n):')
if meaty == 'y':
print 'Here is the meaty menu...'
else:
print 'Here is the veggie menu...'
I get this error:
Traceback (most recent call last):
File "if_elif.py", line 11, in <module>
meaty = str(input('Do you eat meat? (y/n):'))
File "<string>", line 1, in <module>
NameError: name 'y' is not defined
The tutorial I'm following is using Python3 but I'm using Python 2 so maybe that can explain this error?
Thanks guys