Question: Assignment 3: Chatbot (PYTHON CODE) A chatbot is a computer program designed to emulate human conversation. For this program you will use if statements, user

Assignment 3: Chatbot (PYTHON CODE)

A chatbot is a computer program designed to emulate human conversation. For this program you will use if statements, user input, and random numbers to create a basic chatbot.

Here is the scenario: You have decided to start an online website. You are creating a prototype to show investors so you can raise money and launch your website.

You should ask the user at least five questions and use if-elif-else statements and give answers depending on how they answer. Some responses should be based on what they type, and some should be based on random numbers.

For example, if they say they are sad, your chatbot might respond Im sorry to hear that.

You could also have a random number generated between 1 and 3 and have a corresponding response depending on the number such as That is great to hear or So interesting.

Sample Run

Please note: your program will be different - this is only an example (user input is in italics)

What is your name? Pascal Hi there Pascal, nice to meet you. How old are you? 17 17 is a good age. You are old enough to drive. So, Pascal how are you today? happy You are happy. That is good to hear. Tell me more. I am still happy. Sounds interesting. Well, Pascal, it has been nice chatting with you. 

Use the "Run Code" button to interact with your code. When you are ready to submit your code for a score, click the "Grade" button.

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!