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
Roman55 [17]
2 years ago
6

Write a loop that continually asks the user what pets the user has until the user enters rock in which case the loop ends. It sh

ould 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

Computers and Technology
1 answer:
mote1985 [20]2 years ago
6 0

Loops are program statements that are repeated as long as the loop condition is true.

The loop in Python, where comments are used to explain each line is as follows:

#This initializes the number of pets to 0

count = 0

#This gets input for the pet name

pet = input("Pet: ")

#This is repeated until the user enters "rock"

while pet.lower() != "rock":

   #This increases the number of pets by 1

   count+=1

   #This prints the pet and the number of pets

   print("You have a",pet,"with a total of",str(count),"pet(s)")

   #This gets input for the pet name

   pet = input("Pet: ")

Read more about loops at:

brainly.com/question/19344465

You might be interested in
Which contact field is used to control the name that would appear in the To field of an email message when a user is sending a m
ser-zykov [4K]

Answer:

Display as

Explanation:

Need the same question, but that's my guess, because display, means to show.

3 0
2 years ago
Read 2 more answers
Easy way of communication with people is one disadvantage of a network. *<br><br> 1.True<br> 2.False
Maksim231197 [3]

Answer:

false

because we are able to connect with people easily..

without have to wait for long time in the case of letters..

4 0
2 years ago
Read 2 more answers
What are hard ware and software requirments in multimedia computer system
marishachu [46]

Answer:

Some hardware requirement: Monitor, keyboard, mouse, sound card, memory, processor, graphics display card. Some software requirement: Windows XP/Vista, Video for Windows, Quicktime.

Explanation:

BRAINLEST

4 0
3 years ago
Which of the following is typically used in a flowchart to indicate a decision?
Vilka [71]
Diamond is typically used in a flowchart or indicate a decision.
6 0
2 years ago
On a router configured to use RIP, the number of routers a packet must travel between before it reaches its destination is calle
11111nata11111 [884]

Answer:

metric

hop count

Explanation:

6 0
3 years ago
Other questions:
  • Select the correct answer. Which of these is a function of the marketing team of a game development studio? A. creating art elem
    12·2 answers
  • You're programming an infinite loop. What must you include in your code to prevent crashes?
    15·2 answers
  • what is a massive online storage that allows for Access by any internet-connected device running web browser. use for Less priva
    6·1 answer
  • Why is compression a "hard problem" for computers? Draw on your own experience compressing text with the text compression widget
    12·1 answer
  • You are given an array of integers, each with an unknown number of digits. You are also told the total number of digits of all t
    7·1 answer
  • is used to reduce the chance of an individual violating information security and breaching the confidentiality, integrity, or av
    6·1 answer
  • . List 5 types of exploits from cybercrime and provide brief definition. (2.5 Marks)
    5·1 answer
  • Explain in your own words how remote-access Trojans (RATs) work. How can these be used by attackers? How would a network adminis
    10·1 answer
  • Which web browser was created by Google?
    5·2 answers
  • Uh can somebody help me
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!