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
MULTIPLE CHOICE!!!
kolbaska11 [484]
The answer is a) you
8 0
4 years ago
Read 2 more answers
people illegally download music over the internet although it's free it it is still illegal what do you choose to do? why
kodGreya [7K]

Answer:

its A i just did that

Explanation:

4 0
3 years ago
When a user inserts a PivotTable, where will it be inserted?
Alexeev081 [22]

Answer:

depends on whether the Pivot Table is inserted into the current worksheet or a new worksheet and the current location of the cursor.

Explanation:

Pivot tables are short tables with few columns and rows out of the original set of rows and columns. And they are being governed by the report filter, and column labels can also be added, as well as rules can be applied to value, but for formulas, we need to create the formula field. However, it can be placed in the current worksheet or a new worksheet and the current location of the cursor.

3 0
3 years ago
Medical assistant, Jackie, was downloading some patient information on cerebral palsy from the Internet. While downloading, Jack
lyudmila [28]

The thing that happened is that she has been a victim of system attack and the right thing for Jackie to do is to have an antivirus that can block the malicious  app obstructing her.

<h3>What is a system hack?</h3>

System hacking is known to be when one's computer is said to be compromise in regards to computer systems and software.

Note that The thing that happened is that she has been a victim of system attack and the right thing for Jackie to do is to have an antivirus that can block the malicious  app obstructing her.

Learn more about system hack from

brainly.com/question/13068599

#SPJ1

3 0
2 years ago
A column to be used in a database is called the
Temka [501]

it is called an attribute

8 0
3 years ago
Other questions:
  • Which ethernet cabling standard defines an ethernet network that uses cat 3 or better utp cabling, operating at 10mbps?
    8·1 answer
  • How do you make electricity
    10·1 answer
  • Daniel has a list of numbers that are not in any order. He wants to find the order of the numbers with the help of a spreadsheet
    10·2 answers
  • Explain in two or three sentences why health science careers are among the fastest growing careers in
    9·1 answer
  • Write a MASM program to calculate Fibonacci numbers:
    10·1 answer
  • #Write a function called alter_list. alter_list should have#two parameters: a list of strings and a list of integers.##The list
    11·1 answer
  • When you open your word-processing program, it opens in a<br> field<br> menu
    9·2 answers
  • Cora is writing a program to make a motorcycle racing game. If Cora wants to speed of the motorcycle to appear on the screen whe
    12·1 answer
  • You are the PC technician for a company. An employee has gone to a meeting while you fix the computer in her office. She acciden
    15·1 answer
  • A single access point, and the set of hosts it serves, is called a(n) ________. BSS BSSID ESS None of these
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!