Assignment 3: Chatbot edhesive
Answers
Explanation:
Developing an AI assistant involves many steps: finding or creating training data, sorting through many conversations, keeping track of changes to your models, to name a few. And after doing all that work, improving your assistant is an ongoing process. Maybe your assistant is sometimes thrown by unexpected input or has trouble handling certain conversation patterns. Maybe you want to identify which new intents you should support.
You need input from the real world
Answer:import random
name=input("What is your first name? ")
shoes=input("What shoes do you like? ")
print("Nice, casual is always in!")
print("How old are you?")
age = int(input(" "))
print(str(age) + " is a good age to start exploring style")
if(age >= 16):
print("and, you are old enough to drive. \n")
else:
print("Still taking the bus, I see. \n")
print("So, " + name + ", how are you feeling today?")
feel=input(" ")
if(feel== "happy"):
print("That is good to hear.")
elif(feel == "sad"):
print("I'm sorry to hear that. ")
else:
print("Oh my!")
print("Tell me more.")
elaborate=input(" ")
print("Well that's interesting. I hope life treats you well! \n Do you have plans for later?")
ans=input(" ")
if(ans== "yes"):
print("Awesome! I hope you have fun!")
elif(ans== "no"):
print("Aw, maybe we can make some plans then?")
else:
print("Alright! You can tell me more later.")
flav=input("What's your favorite icecream flavor? ")
if(flav== "vanilla"):
print("Yum! Simple, yet delicious.")
elif(flav== "chocolate"):
print("Ah, I don't like chocolate.. It's my least favorite.")
else:
x=random.randint(1,3)
if x==1:
print("Sounds delicious! I'll have to give it a try!")
elif x==2:
print("I've never heard of that before! I'll give it a try!")
else:
print("I've tried that! It's really good.")
Explanation: