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
What are the synonyms for each word? :
lyudmila [28]
Ok sistah, me got you, 
(1) gather together, or increasing number
(2) price or amount charged
(3) intentionally 
(4) Take or seize
(5) extremely large or great
(6) savagely fierce or violent 
(7)<span>irritate intensely
(8) miffed
(9)</span><span>well meaning and kindly
(10) pensive

Hope i helped :)</span>
8 0
3 years ago
An engine you're servicing has electronically controlled cooling fans. Cooling fan 1 doesn't work but cooling fan 2 does. Which
Elanso [62]

It might because of many reasons:

  • Fan 1 is not connected to the Program (via Bluetooth, WIFI, or wired)
  • The code made to make Fan 1 start up has a bug or an error
  • Fan 1 has a hardware problem
  • Fan 1 is out of reach for the electronically controller to reach
  • Fan 1 is not connected to a power supply (tho)

<u><em>sorry if my answers don't help solve your problem </em></u>

4 0
3 years ago
You want to copy data from one cell or range to an adjacent cell or range in your spreadsheet, without using a shortcut key. Whi
astraxan [27]

How can you insert a new row into your data without disturbing an adjacent set of data on the same sheet? Highlight only the data where you'd like to insert a row. Right-click > Insert > Shift cells down.

3 0
2 years ago
A set of blocks contains blocks of heights 1,2, and 4 centimeters. Imagine constructing towers of piling blocks of different hei
SashulF [63]

Answer:

In studies about new medicines, researchers usually give one group of patients the medicine that is designed to treat an illness. They give another group of patients a placebo, which is taken the same way as the medicine but does not actually contain the ingredients of any medicine. Different medicines are tested in different experiments, but the placebos usually contain the same non-medical ingredients. If both groups of patients are healed, then researchers cannot be sure whether the medicine caused improvement, but if the group given the medicine is healed while the group given the placebo remains ill, researchers can conclude that the medicine causes the illness to go away.

In medical experiments, which group receives placebos?

the experimental group

the control group

both the experimental and control groups

neither the experimental nor control group

Explanation:

5 0
3 years ago
A security engineer is configuring a wireless network that must support mutual authentication of the wireless client and the aut
rewona [7]

Answer:C) PEAP(Protected Extensible Authentication Protocol)

Explanation: PEAP(Protected Extensible Authentication Protocol) is the protocol that is used in point-to-point network connection and wireless network connection.It is the version of EAP(Extensible Authentication Protocol) with the advantage of protection to maintain the security.

Other options are incorrect because EAP-FAST is the EAP protocol with that has flexible authentication through secure tunneling, EAP-TLS is the EAP protocol with the transfer layer security and EAP is used for the expansion of authentication method for the network between internet and computer system.Thus, the correct option is option(c).

7 0
2 years ago
Other questions:
  • How is the Task Manager helpful in displaying which resources your computer is using and how fast?
    5·2 answers
  • 14. What is the simplest way to permanently get rid of an unwanted file?
    9·1 answer
  • _____ is a systems development technique that produces a graphical representation of a concept or process that systems developer
    11·1 answer
  • What decides the amount of delay between shots on a digital camera?
    7·1 answer
  • Help please<br>x + 1 = –x + (–5)​
    7·1 answer
  • Select the software which is used to convert audio data to text .
    15·1 answer
  • Which four of the following qualify as fair use?
    11·2 answers
  • What version of java do i have installed.
    6·1 answer
  • Trojans depend on ________ to spread. A rootkits B self-replication C code injection D social engineering
    14·1 answer
  • Can somebody please help me with these few questions?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!