Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Let's Write Another Chatbot Let the bot have two lists... yeses = [yes, y, of course, certainly, sure] noses = [no, n, no way, of
Let's Write Another Chatbot Let the bot have two lists... yeses = ["yes", "y", "of course", "certainly", "sure"] noses = ["no", "n", "no way", "of course not", "never"] Then check if the user's response is one of these lists? After the user gives a reasonable response... Offer the user to ask 2 yeso questions. For each such question, randomly choose whether the bot answers yes or no, and then use some of the yeso variations. Optional: detect if the user question has the word "name" in it, and in that case the chatbot should reply informing its name. Optional: say goodbye in different ways. Sample Runs Example Output 1 Hi dear user! Do you want to talk to me? ==> sure! Great! Let's talk, my friend! Ask me any question you want ==> are you alive? no way Ask me any other question you want ==> are you serious? certainly yes Ok, enough talking ciao
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started