Я написал этот скрипт на Python 2.7:
name=raw_input("Hi im a PC, who are you?")
print("Hi " + name + " how are you, are you good?")
answer = raw_input("")
if (answer) == yes:
print("That's good to hear")
elif (answer) == no:
print("Oh well")
else:
print("Sorry, you didnt answer the question properly, Please answer with a yes or no")
Это ошибка, которую я получаю:
Traceback (most recent call last):
File "C:/Python27/programs/2", line 4, in
if (answer) == yes:
NameError: name 'yes' is not defined