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

can someone help me with this asap
Mary Brown brings her 2 month son, Zach, in for his well child check. The provider discusses vaccines with the mother and the mother refuses her son to have the
the difference between lactic acid fermentation and alcohol fermentation ​
I need help plzzzzzzzzz
what is the y intercept y=-4x-5
. If the mass of an object on Earth is 18kg what would the mass of the same object be on the Moon? A. 18kg B. 6kg C. 108kg D. 3kg
Jake wrote a story about a woman who goes sailing alone for the first time after taking sailing lessons. The woman needs to sail a small sailboat to the middle
Which statement about the food chain is correct? A. The Harpy Eagle obtains chemical energy from the Sun. B. The Red-eyed Tree Frog obtains chemical energy from
A country that wanted to protect the civil rights of all of its citizens would not have _________. a) a poll tax b) a Bill of Rights c) Suffrage rights d) Due p
A theater company charges $9.50 per ticket for people of all age groups. If c represents the total number of children who bought tickets and a represents the to