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

Solve the equation, 2x + 1 = 3, for x. Which of the following properties of equality did you apply? Question 5 options: A) Subtraction and division B) Subtracti
Why is Britney Spears insane? I’m graduated so my points are up for grabs cause I’ll never use them. I have to at least as a question with it though.
25. Smoke and fog together give rise to: global warming smog ozone depletion acid rain
5+2 I’m graduated so my points are up for grabs cause I’ll never use them. I have to at least as a question with it though.
85 POINTS!!!!!! Describe the graph of y = -|x + 4| - 5. 9(For 85 points it should at least be a sentence or two)
Differentiate between the points of parity to the points of difference based on the given scenarios. Points of parity I Points of difference A national college
At the market, almonds cost $0.51 per ounce. How much does a bag of almonds cost if it weighs 1.6 ounces?
Amara and Nikhil walk home from school together every day. Amara's walk is 5/8 of a mile. Nikhil's walk is 1 1/2 miles. How many times as far as Amara did Nikhi
[tex]\sqrt{x} 180[/tex]
What is the formula of Sodium Sulfide? A) Na3S₂ B) NaS₂ C) Na₂S D) Nas