Answer:
pet = input(str("What pet do you have?"))
totalPets = 1
while(pet!="rock"):
print("You have a " + str(pet) + " with a total of " + str(int(totalPets)) + " pet(s)")
totalPets = totalPets+ 1
In python 3:
total = 0
while True:
pet = input("What pet do you have? ")
if pet == "rock":
break
total += 1
print("You have a {} with a total of {} pet(s)".format(pet, total))
I hope this helps!
5.7m questions
7.5m answers