Find expert answers and community support for all your questions on IDNLearn.com. Get the information you need from our experts, who provide reliable and detailed answers to all your questions.

Python question 4.2: Question 2

Python Question 42 Question 2 class=

Sagot :

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