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

Insects may be preserved in the hardened sap of trees called
Plant material accumulated in these areas of indiana and eventually became the source of indiana’s abundant
Oceans take a long time to get heated or cooled. Which of these is an example of how the capacity of the ocean to absorb and store heat for a long time influenc
“When I Have Fears” ends with an expression of the speaker’s
Can someone please help me on this one?
_______ is known as the "queen of the arts." a. sculpture b. music c. painting d. architecture
Which of the following event's occurred between 1915 and 1935 ?
I need help with #12! Please help ASAP!
What type of phrase is underlined in this sentence? The train will be arriving in [i]an hour or two.[/i] A. Adjectival B. Verb C. Adverbial
An increase in the spread of food-borne illness could be attributed to all of the following except a. consistency among microbial populations. b. increased su