![quantaviousw49](/avatars/18826.jpg)
quantaviousw49
05.11.2020 •
Computers and Technology
4.2 code need help plz someone 15 points if u help
Solved
Show answers
More tips
- S Sport How to Choose Tennis Rackets?...
- H Health and Medicine AKDS Vaccination: Ensure Your Child s Safety...
- H Health and Medicine Naskol ko Opasen Ukus Kleshcha i Kak Ego Raspoznat...
- C Computers and Internet How to Delete Your Account on Odnoklassniki...
- H Health and Medicine What to Do When Your Jaw Locks Up?...
- G Goods and services What Are the Most Popular Services?...
- P Philosophy How did the concept of module arise in computer science?...
- F Food and Cooking How to Cook Julienne? Recipes and Tips...
Answers on questions: Computers and Technology
- P Physics How are electrons distributed in the molecular orbitals, when the 1s orbitals of two hydrogen atoms combine to form a hydrogen molecule?...
- E English How do the heading in the body of this article help to organize the information? A. The headings show that each section is about a technology Sylvia Earle has helped develop B. The...
- H Health Sexually contraceptive use among adolescent...
- M Mathematics What’s your eye color? A: brown...
Ответ:
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.
Ответ:
Step-by-step explanation:
I