4.2 Code Practice: Question 2
Instructions
Write a loop that continually asks the user what p...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 31.01.2021 09:50 Longjeremiahs5797
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](/tpl/images/cats/User.png)
Answers: 3
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/informatica.png)
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?
Questions
![question](/tpl/images/cats/istoriya.png)
History, 09.02.2021 21:10
![question](/tpl/images/cats/mat.png)
Mathematics, 09.02.2021 21:10
![question](/tpl/images/cats/mat.png)
Mathematics, 09.02.2021 21:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 09.02.2021 21:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/health.png)
Health, 09.02.2021 21:10
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 09.02.2021 21:10
![question](/tpl/images/cats/mat.png)
Mathematics, 09.02.2021 21:10
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 09.02.2021 21:10
![question](/tpl/images/cats/mat.png)
Mathematics, 09.02.2021 21:10
![question](/tpl/images/cats/health.png)
Health, 09.02.2021 21:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 09.02.2021 21:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 09.02.2021 21:10
![question](/tpl/images/cats/en.png)
English, 09.02.2021 21:10
![question](/tpl/images/cats/himiya.png)
Chemistry, 09.02.2021 21:10