If I am trying to get responses like I say "Hello" and get a random response in return (from the code below) how would I make this work based off of what I say like if I were to say "what is your name" and want a response from a name list instead Can I pull that off with a Dict?
import random
responseHello = [
"Hi!",
"Hello!",
"How can i help you?",
]
responseDict = {
"hello" : "responseHello"
}
h = input("say Hello:")
if h = responseDict["hello"]
print(responseHello)
So, as shown here (I know that bottom half certainly isn't right I just tried it) what would I have to do in order to get my input to cause a different response?. I am so sorry if this doesn't make sense, I just learned of the dictionary command today and am trying to figure it out. any help is greatly appreciated! (I know I have to try following some tutorial for chatbots but every time I do TensorFlow doesn't work at all)