Welcome to Westonci.ca, where finding answers to your questions is made simple by our community of experts. Get the answers you need quickly and accurately from a dedicated community of experts on our Q&A platform. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

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