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

name 2 sound devices and what type they are from the song Where Is The Love by the Black Eyed Peas.
name 2 sound devices and what type they are from the song Where Is The Love by the Black Eyed Peas.
Round 13 513 to the nearest thousand
A 1700 kg 2006 Mustang GT can accelerate from rest to 100 km/h in a time of 5.0 s.  Determine the net amount of work that must be done on the car to cause this
A storage tank shaped Like a rectangular prism is being manufactured to hold 100,000 cubic feet of natural gas. It has a length of 10 feet and a width of 25 fee
What do you mean by corrosion? How can you prevent it?
A 1700 kg 2006 Mustang GT can accelerate from rest to 100 km/h in a time of 5.0 s.  Determine the net amount of work that must be done on the car to cause this
How many eights are there in 6 1/2
A storage tank shaped Like a rectangular prism is being manufactured to hold 100,000 cubic feet of natural gas. It has a length of 10 feet and a width of 25 fee
distribute (x+1)(x-2)