answer.
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]
1 year 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]1 year 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
What should businesses do in order to remain competitive under the current Cloud<br> landscape?
Kamila [148]

Answer:

Cloud Landscape

They must evangelize the benefits of cloud computing to company executives in order to assist them in developing and extracting business benefits that will give them a competitive advantage and increase profits

Explanation:

The most successful organisations carefully plan out a multiyear effort to improve their cloud adoption, focusing on multiple streams of work across several stages of maturity.

Cloud computing governance is difficult even when only one cloud provider is involved, and it becomes even more difficult as organisations move toward multi cloud.

Continuous workload placement analysis involves reassessing workloads at a regular cadence, evaluating whether the current execution venue sufficiently meets the organization’s needs and if migrating to an alternative model provides higher value without adding significant risk to the organization’s operations

They must evangelize the benefits of cloud computing to company executives in order to assist them in developing and extracting business benefits that will give them a competitive advantage and increase profits.

8 0
2 years ago
Read 2 more answers
Susan is creating a spreadsheet, and she needs to enter the months of the year in column A. Susan should _____.
AysviL [449]
Enter January in A1 hold mouse in bottom right hand corner of cell. Hold mouse button down and drag the mouse. Excel will populate the months of the year
3 0
1 year ago
Read 2 more answers
An I/O-bound program is one that, if run alone, would spend more time waiting for I/O than using the processor. A processor-boun
Lelechka [254]

Answer with Explanation:

An I/O-bound the programs that are used relatively a little processor times and are favored by an algorithm. However, if the processor bound process is denied the processor time for the sufficiently long periods of times, the same algorithms will be granted a processor to the process and it has not use the processors at all in recent pasts. Therefore, the processor bound process will not be the permanently denied to access.

3 0
2 years ago
A form that dedicates a page for each item retrieved for a case; it allows investigators to add more detail about exactly what w
gregori [183]

Answer:

Single-evidence form​

Explanation:

Single-evidence form​  dedicates a page for each item retrieved for a case; it allows investigators to add more detail about exactly what was done to the evidence each time it was taken from the storage locker.

4 0
2 years ago
Help me! I’ll make you brainly and give extra points!
notka56 [123]

Answer: Number nine I would say black and gray.

Explanation: Someone else has the say problem as you.

4 0
1 year ago
Other questions:
  • In the State of Florida, the penalties for DUI become progressively more severe depending upon the number of convictions and the
    6·3 answers
  • Match each function with its possible output.
    7·2 answers
  • A queueing system has four crews with three members each. The number of "servers" is:
    5·2 answers
  • The primary function of application software is to apply the power of the computer to enable people, workgroups, and the entire
    7·1 answer
  • C# Write, compile, and test a program named PersonalInfo that displays a person’s name, birthdate, work phone number, and cell p
    8·1 answer
  • A student who used a regression model that included indicator variables was upset when receiving only the following output on th
    10·1 answer
  • Assume that machines A and B are on the same network 10.3.2.0/24. Machine A sends out spoofed packets, and Machine B tries to sn
    14·1 answer
  • Choose the correct function to convert the user’s response to the number 3.5. &gt;&gt;&gt; answer = input("How much does the sam
    10·2 answers
  • A line graph titled Unemployment Percentages and Levels of Education where the x-axis shows dates from November 2007 to November
    11·1 answer
  • Suspicious activity, like IP addresses or ports being scanned sequentially, is a sign of which type of attack?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!