At Westonci.ca, we provide clear, reliable answers to all your questions. Join our vibrant community and get the solutions you need. Experience the convenience of getting accurate answers to your questions from a dedicated community of professionals. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our 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