At Westonci.ca, we connect you with experts who provide detailed answers to your most pressing questions. Start exploring now! Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields 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