1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
frosja888 [35]
3 years ago
12

Write a loop that continually asks the user what pets the user has, until the user enters "rock", in which case the loop ends. I

t 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)
Computers and Technology
1 answer:
DedPeter [7]3 years ago
7 0

Answer:

Check the explanation

Explanation:

The Python program that frequently asks the user what pets the user has,

until the user enters "rock", in which case the loop ends can be analysed in the written codes below.

'''

# count of pets

count = 0

# read the user input

pet = input()

# loop that continues till the user enters rock

# strip is used to remove the whitespace

while pet.strip() != 'rock':

  # increment the count of pets

  count += 1

  # output the pet name and number of pets read till now

  print('You have a %s with a total of %d pet(s)' %(pet.strip(),count))

  pet = input() # input the next pet

#end of program

You might be interested in
Linux distributions overview? information​
disa [49]

Answer:

Debian

Arch Linux

Ubuntu

Fedora

Manjaro

Linux Mint

Elementary OS

openSUSE

Explanation:

6 0
3 years ago
Fill in the blank - A generation of social-oriented, physical games such as the _______ Wii console, emerged in the late 2000s,
disa [49]

Answer:

wild bro just need points

Explanation:

6 0
4 years ago
State and explain three importance of internet education​
Ne4ueva [31]

Answer:

It can improve the quality of education in many ways. It opens doorways to a wealth of information, knowledge and educational resources, increasing opportunities for learning in and beyond the classroom. Teachers use online materials to prepare lessons, and students to extend their range of learning

Explanation:

4 0
3 years ago
Read 2 more answers
A main reason careers in Information Technology are growing faster than average is
Scorpion4ik [409]
Technology has become such a major part of everyday life
8 0
3 years ago
After you design and write your help-desk procedures to solve problems, what should you do next?
vichka [17]

<em>After you design and write your help-desk procedures to solver the problem, the next step would be, testing and implementation. </em>

<em> </em>

<em>Basically, in any problem-solving process, after planning and designing the solutions, the next process that should be implemented next is: testing and implementation. In the testing phase, staff and employees would implement the solution softly, meaning everything is not advertised yet and not formal yet. They would execute the plan and design and would evaluate if it is really effective. A documentation will prepare as the basis of the evaluation. After the testing, the project team would determine if the offered solution is possible or if there are more improvements to make.</em>

7 0
3 years ago
Other questions:
  • Regarding an intrusion detection system (IDS), stateful matching looks for specific sequences appearing across several packets i
    9·1 answer
  • Consider the concept of cultural lag. Identify two American values that are “lagging.” What are three norms that are lagging? Ho
    11·1 answer
  • Averigua las diferentes intensidades, la potencia total y el gasto en € (de un mes de 30 días con el equipo conectado todo el ti
    12·1 answer
  • Ann wants to save her presentation so she can work on it later. Which device on her computer can store this data long term?
    14·1 answer
  • Molly, a technician, has been tasked with researching an emulator for the software developers to test cross-platform application
    13·2 answers
  • With a DUI charge on a driver’s record ______________.
    10·1 answer
  • To answer the research question "How am I going to find the information I need on the tople?" the best thing Georgia should
    15·1 answer
  • 01110100 01101000 01101001 01110011 00100000 01110011 01110101 01100011 01101011 01110011 00100000 01100010 01100001 01101100 01
    12·2 answers
  • Will, there be any presents this year
    15·1 answer
  • How is binary used in pixels and in sound?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!