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

plz help me with my homework
Write one sentence using the two adverbs? Really, probably.
do you think it is important for our country to remember the history of immigrant question why or why not?
5. Which of the following must an animal do to survive? - Reproduce - Breath air - Maintain homeostasis - dig a burrow
Which sentence does not contain any errors in the use of italics or quotation marks? A. I learned that fact from reading the magazine National Geographic. B. "J
In Egyptian mythology, Hathor is a(n) ___ goddess who has the head of a cow. A. ursine B. leonine C. simian D. bovine
multiply and simplify (a-3b)^2
What was the result of the collision of the two tectonic plates
what statement best explains the significance of the Mayflower compact
one thing explorers were looking for on their voyages was bannans spices freshwater volcanoes