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

what is the answer to this problem 5n^2+10n+20
what are bubbling leaves and molten rock called from a volcano
According to Newton's Second Law of Motion, when an object is acted on by an unbalanced force, how will that object respond? A. It will accelerate. B. It will s
Which of the following was primarily a political challenge that the United States faced after the Civil War? (Points : 3) worthless Confederate currency that le
What is 0.78 divided by 3.51??? (Decimals)
The SI unit of power is the
Which young French officer became a general on Washington's staff and his lifelong friend? A. George Rogers Clark B. Nathanial Greene C. Marquis de Lafayette D.
which decimal represents 3/5
describe what happens during the first stage of the cell cycle in a eukaryotic cell
Eduardo is building a sandbox that has an area of 84 square feet. What are the possible whole number measurements for the length and width of the sandbox?