subject

In this exercise, you are going to make a sample bot conversation. At this point, we don't have too much that we can do, but you are going to ask the user for their name and then use that in the constructor for the bot. After that, you are going to simulate a conversation. You will print questions to the console and answer them by calling methods from the Bot class. (You don't actually prompt the user for any information other then their name).

When you are finished, your output should match the output below (with the exception of your name).

Sample Output:

Hello. What is your name?

Kiara

Hello Kiara! My name is Hal!

How are you today!

You can ask me about the weather,

or how many feet are in a mile.

I can even convert feet to meters!

What's the weather like?

Its always warm and dry inside your computer!

How many feet in a mile?

There are 5280 feet in a mile.

It was nice talking with you!

Have a great day!

Challenge: The bot does have some additional commands included, but we haven't covered these topics yet. Can you figure out how to access some of these methods?

ansver
Answers: 1

Another question on Advanced Placement (AP)

question
Advanced Placement (AP), 23.06.2019 05:30
If you could have one clothing item of your choice, but it was in either of these colors, which would you choose out of each category? blue or pink red or yellow red or green green or purple blue or green
Answers: 1
question
Advanced Placement (AP), 24.06.2019 05:30
1) earth's crust is made up of relatively rigid plates that ride atop earth's hot, semiliquid mantle. (2) the plates are called tectonic because they're in constant motion. (3) they can move because earth's mantle is a very hot and semiliquid fluid called magma. (4) volcanoes are a result of magma rising up or erupting through a plate, particularly where plate boundaries are moving against each other. (5) also, when plates slide against each other, causing friction along adjacent plate boundaries, earthquakes frequently occur. (6) therefore, we often find volcanoes and earthquakes along plate boundaries. (7) plates may also collide. (8) when that happens, mountain ranges are formed. (9) for example, the collision of the plate carrying the indian subcontinent created the himalayan mountains when it collided with the asian plate. 2. which sentence in this passage introduces a new topic that might begin a new paragraph? a. sentence 5 b. sentence 4 c. sentence 7 d. sentence 6
Answers: 1
question
Advanced Placement (AP), 25.06.2019 02:00
98 points! include an answer and in advance!
Answers: 1
question
Advanced Placement (AP), 25.06.2019 09:00
4. when a child cries out during rough play, the caregiver should a. encourage the distressed child to fight back. b. respond immediately, since the behavior has changed to fighting. c. ignore it, because rough play is a natural part of children’s learning. d. ignore the request for unless there has been an injury. i need answer
Answers: 1
You know the right answer?
In this exercise, you are going to make a sample bot conversation. At this point, we don't have too...
Questions
question
Chemistry, 04.05.2021 14:00
question
Biology, 04.05.2021 14:00
question
Mathematics, 04.05.2021 14:00
question
English, 04.05.2021 14:00
question
Mathematics, 04.05.2021 14:00
question
Mathematics, 04.05.2021 14:00
question
Social Studies, 04.05.2021 14:00
Questions on the website: 13722362