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
zhannawk [14.2K]
3 years ago
5

4.2 code need help plz someone 15 points if u help

Computers and Technology
1 answer:
Korolek [52]3 years ago
8 0

def func():  

 total = 0

 while True:

   pet = input("What pet do you have? ")

   if pet == "rock":

     return

   total += 1

   print("You have a {} with a total of {} pet(s)".format(pet, total))

func()

We wrapped our code in a function so that whenever the user enters rock, we can simply return and exit the function. If you have any other questions, I'll do my best to answer them.

You might be interested in
Create a Produceclass that hasan instance variable of type Stringfor the name, appropriate constructors, appropriate accessor an
Nezavi [6.7K]

Answer:

you suck

Explanation:

5 0
3 years ago
Which best compares and contrasts visual and performing arts? Both careers use communication skills; however, people involved in
Vlad1618 [11]

Answer:

Both careers speak to an audience; however, people involved in the performing arts speak only to a live audience.

Explanation:

sorry im late but im not sure

3 0
3 years ago
Read 2 more answers
Which of the following is not a basic role of a webmaster
Natalija [7]
Out of the following, the only one that I see is not the basic role of a webmaster is replying to customers questions about the web site! Usually they have a specific job for that; like customer service etc. Hopefully that helps.
5 0
3 years ago
In a wide area network (WAN), how would you troubleshoot an issue with the domain name system (DNS)?
NISA [10]
<span>C. Get the help of someone with specialized knowledge in the area.</span>
3 0
3 years ago
Read 2 more answers
Fill in the blank: In a Word chart, text that describes the data represented in a chart and that is typically displayed on the r
Triss [41]

Answer:

Data bar

Explanation:

8 0
3 years ago
Other questions:
  • How does the discussion of “Luddites,” “Marx,” and “John Maynard Keynes” in paragraph 21 contribute to the development of the id
    7·1 answer
  • Which tag pair contains the items in an ordered or unordered list?
    12·1 answer
  • It is a small hand tool used generally in decorative works such as making garnishes
    15·1 answer
  • An organization is developing an authentication service for use at the entry and exit ports of country borders. The service will
    10·1 answer
  • Now now now now mowewweedeeee
    13·1 answer
  • How did the internet originate??​
    12·1 answer
  • HELLO!!!! For instance, will we get an error if we put a space after the word “print” and before the opening parenthesis in pyth
    9·1 answer
  • People of brainly Just a quick warning that there is a group of people posting links with virus.
    11·2 answers
  • What are some positive and nevative aspects of technology?
    11·1 answer
  • Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!