Question: [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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!