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
Why might a business choose a server-based network over a peer-to-peer network?
valina [46]

Answer:

Hope this helps you out    Answer: Greater security

Explanation:

Server maintains better relationship with server at everry time. So it gives maximum of security and reliability against unauthorised access

3 0
3 years ago
An IT security threat is anything that might cause serious harm to a computer system.
Blababa [14]

Answer:

True

Explanation:

this is true because a threat can endanger the computer and its system

5 0
2 years ago
You are the CEO of a large tech company and have just received an angry email that looks like it came from one of your biggest c
sergejj [24]

Answer: as a whale attack

Explanation:

A whale attack is simply refered to as an attack that is utilized by cybercriminals and in this case, a senior player such as the CEO is targeted in the company and the aim is to steal sensitive information from them or steal money or gain access to their computer for fraudulent purposes.

Based on the explanation above, the attack called into is a whale attack.

4 0
3 years ago
In the game of economics, producers look to technological improvements to increase which of the following?
Vaselesa [24]
They're looking to increase productivity 
7 0
3 years ago
Read 2 more answers
What data type would you use for a decimal number?* ​
Elan Coil [88]

Answer:

numeric

Explanation:

The decimal data type is an exact numeric data type defined by its precision (total number of digits) and scale (number of digits to the right of the decimal point).

I hope this answers your question.

3 0
2 years ago
Other questions:
  • Consider the following method:
    8·2 answers
  • What is the communications activity of the Internet called
    15·1 answer
  • A. True
    7·1 answer
  • PLEASEEE HELPPPP me
    13·1 answer
  • To print data sideways on a piece of paper, use the _______ page orientation setting.
    6·2 answers
  • Different organizations implement different Information Systems base on their core business operations. explain
    14·1 answer
  • Universal Containers (UC) has multi-level account hierarchies that represent departments within their major Accounts. Users are
    13·1 answer
  • Which category does this fall in identity theft​
    6·1 answer
  • Where ....................... the books that you borrowed? *
    5·1 answer
  • Select the skill that matches the following definition.​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!