nobodydml
nobodydml nobodydml
  • 03-01-2022
  • Computers and Technology
contestada

Python question 4.2: Question 2

Python question 42 Question 2 class=

Respuesta :

aayu0302
aayu0302 aayu0302
  • 03-01-2022

Answer:

n=1

while True:  

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

   if i=="rock":

       break

   else:

       print("You have a " + i + " with a total of " + str(n) + " pet(s)")

       n=n+1

Answer Link

Otras preguntas

Mutations can be beneficial. neutral. harmful. all of the above
write 100/250 in simplest form !
japan invaded manchuria in 1931 because
Find the volume of 10g of gasoline
All of the following are subtheories of the triarchic theory of human intelligence except __________ subtheory. a. practical b. creative c. analytical d. emotio
What is the benefits of recycling plastic and paper products to wildlife? a. fewer landfills b. less expense c. sustainable energy d. clean fuel
What do Mexico Costa Rica & Brazil have in common
In "By the Waters of Babylon," what are the priests forbidden to do? Talk to the Forest People Go East Fish in the river Enter the Dead Places
___ determines Arthur's success at pulling the sword, Excalibur, from its stone. a. Antecedent b. Precept c. Predestination d. Premonition
During a recent thunderstorm, the temperature dropped 24° in 3 hours. What integer completes the equation to find the average hourly change in temperature?