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 two "executive powers" are held by the senate? what is the role of the house and senate in the impeachment process?
A mass of 15 kg of air in a piston-cylinder device is heated from 25 to 77°c by passing current through a resis tance heater inside the cylinder. the pressure
Please help me on 3,4 and 6. Thanks
Which property do you use to change the size of the text on a button object?
A vacant lot is in the shape of an isosceles triangle. It is between two streets that intersect at an 85.9degree angle. Each of the sides of the lot that face t
Evaluate the expression. r = <9, -7, -1>, v = <2, 2, -2>, w = <-5, -2, 6> v ⋅ w A) <-18, 14, -2> B) -26 C) 1 D) <-10, -4, -12>
Match the scenarios with the economic concepts they illustrate.
Please help begging I'm dim
With 128,134,140,146,152,whats the next number If the pattern continues?
What is the median of the numbers 8.7, 8.7 8.9, 9.0, 9.1, 9.2? I know I'm supposed to find the middle number, but there's an even amount of numbers here. So I'm