subject

4.2 Code Practice: Question 2 Instructions
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
cate
Sample Run
What pet do you have? lemur
what pet do you have? parrot
what pet do you have? cat
what pet do you have? rock
Sample Output
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)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Eye injuries usually occur as a result of all of the following things, except: a) proper machine operation b) battery explosion c) falling or flying debris d) electric welding arc
Answers: 2
question
Computers and Technology, 22.06.2019 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Jennifer has to set up a network in a factory with an environment that has a lot of electrical interference. which cable would she prefer to use? jennifer would prefer to use because its metal sheath reduces interference.
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
You know the right answer?
4.2 Code Practice: Question 2 Instructions
Write a loop that continually asks the user what p...
Questions
question
Mathematics, 09.02.2021 21:10
question
Mathematics, 09.02.2021 21:10
question
Chemistry, 09.02.2021 21:10
question
Health, 09.02.2021 21:10
question
Mathematics, 09.02.2021 21:10
question
Mathematics, 09.02.2021 21:10
question
Chemistry, 09.02.2021 21:10
Questions on the website: 13722367