This code uses a while loop to repeatedly ask the user for the type of pet they have. If the user enters "stop," the loop breaks, and the program stops. Otherwise, it increments the pet_count and prints the information about the entered pet.
pet_count = 0
while True:
pet_input = input("What pet do you have? ")
if pet_input.lower() == "stop":
break
pet_count += 1
print(f"You have one {pet_input}. Total # of Pets: {pet_count}")
print("Program stopped.")