So im trying to make a conversation generator in python using the fashion of an AI where the user will say something like 'hi' and then the machine replies 'hello how are you' and as you can guess, this will need alot of user input but every time i input ANYTHING, i get the output:
Traceback (most recent call last):
File "main.py", line 4, in <module>
talk=input('')
File "<string>", line 1, in <module>
NameError: name '___' is not defined
heres my code:
#Modules
import os
#Getting User Input
talk=input('')
#Machine responding
if talk == "Hi":
print('Hey, how are you?')
feeling=input('')
if feeling == "good":
print('Thats good!')
if feeling == "bad":
print('aww thats bad, maybe chatting with me will help?')
#Restarting The script
os.system('python main.py')
Just for some extra info, im using python 3 running scripts via ubuntu root terminal All help is greatly appreciated. Thanks.