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

Please get it right i can’t get it wrong
Suppose f(x) = x^2-3x+2 and g(x) = 3x^2+5x+2. (f+g)(x)=
Cameron deposits $120,000 in a bank account that earns 0.5% interest, compounded yearly, At the same time, John deposits $135,000 in another bank account that e
Explain the relationship between size and fecundity
Look at the table below. It shoes the relationship between feet and yards. f y 3 1 6 2 9 3 12 4 Which equation represents the relationship shown in the table?
an error of 15cm was made in measurimg a length that was actually 165cm.whatpeecentage error was dat​
Find the shortest distance from the origin (0,0) to a point on the circle defined by x^2 + y^2 + 4x - 8y + 19 = 0
5. Baseballs come in cartons of 84 baseballs. A team orders 18 cartons of baseballs. How many baseballs does the team order? Explain how you got the answer.
In the book Of Plymouth Plantation what is some evidence of Puritan belief about "Upon their arrival, they fell to their knees and blessed God"
Jonas has written the following rough draft for school. Choose the correct way to complete each sentence​