Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[PYTHON] Create a chatbot program in Python: a program that appears to talk intelligently to a human using text. Your program should involve asking the

[PYTHON] Create a chatbot program in Python: a program that appears to talk intelligently to a human using text. Your program should involve asking the user questions and having the computer respond in a reasonably intelligent fashion based on those answers. For example, here is a sample chat:

ChatBot: Welcome, I am Chatbot . What is your name?

User: My name is Abby .

ChatBot: Hello Abby. How old are you?

User: 22. <---- Input

ChatBot: That is older than I am! Can you guess my age?

User: 11. <----- Input

Chatbot: That is incorrect. My age is between 5 and 10. Guess again.

User: 4. <----- Input

Chatbot: Correct! What is your favourite animal?

User: Cat. <------ Input

Chatbot: I do not like cats. I prefer dogs.

etc.

You may make your chatbot ask and answer any questions, so long as you include at least the following:

- One if/else statement.

- One if statement using OR.

- One if statement using AND.

- One if statement using both AND and OR.

- At least one loop.

- At least one calculation involving a numerical answer that the user inputted (for example, in the above chat, the chatbot might calculate the difference between its age and the users age and output this).

The input only has to be one word or numbers, doesn't have to be a phrase.

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 Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

1-4 How will MIS help my career?

Answered: 1 week ago