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

Complete the steps to factor the polynomial by grouping. p(x) = x3 5x2 – x – 5 p(x) = x2 (x ) – (x 5) p(x) = (x2 – )(x 5) p(x) = (x – )(x 1)(x )
A boy throws a ball vertically up it returns the ground after 10 seconds find the maximum height reached by the ball
(a) By what least number must 27 be divided to make it perfect square​
A plane flies at 350 mph in the direction 40° north of east, with a wind blowing at 40 mph in the direction 30° south of east. What is the plane’s drift angle?
Explain Russia and Ukraine war?​
Which of the following is a sum of cubes?
Jacob invests a sum of money in a savings account with an interest rate of 9% compounded continuously. After 6 years, the balance reaches $11,303.34. What was t
simplify (8x^2y^3)/(2x^4y)
In a factory, the chance that a certain machine works without overheating in the morning is 50%. if it runs smoothly all morning, then there is an 85% chance th
1. What are the independent and dependent variables in each of the experiments? 2. What information should be added to the diagram to give the reader a better u