Computers and Technology

Write a loop that continually asks the user what pets the user has, until the user enters "rock", in which case the loop ends. It should acknowledge the user in the following format. For the first pet, it should say "You have a dog with a total of 1 pet(s)" if they enter dog, and so on.
Sample Run:
User enters:
lemur parrot cat rock
Outputs:
You have a lemur with a total of 1 pet(s)
You have a parrot with a total of 2 pet(s)
You have a cat with a total of 3 pet(s)

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:30, tfornwalt4390
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
image
Computers and Technology, 23.06.2019 02:30, bre563
Research data that is presented using descriptive language is said to be
Answers: 2
image
Computers and Technology, 23.06.2019 20:30, cristalcastro901
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
image
Computers and Technology, 24.06.2019 02:30, talia43
Assume a class window with accessor method getwidth that accepts no parameters and returns an integer. assume further an array of 3 window elements named winarr, has been declared and initialized. write a sequence of statements that prints out the width of the widest window in the array.
Answers: 2
Do you know the correct answer?
Write a loop that continually asks the user what pets the user has, until the user enters "rock", in...

Questions in other subjects:

Konu
English, 27.01.2021 05:40
Konu
English, 27.01.2021 05:40