Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions