i'm doing exercise 7-4 from "Python Crash Course", which is about writing a while loop to prompt customers to input pizza toppings until they type "quit". While i'm running the following code it prints once every third time and breaks after typing "quit" twice. Can someone please point out what i'm doing wrong. Thank you.
prompt = "Enter your topping: "
while True:
topping = input(prompt)
if input(prompt) == "quit":
break
else:
print(f"{input(prompt)} is added")
Here is an example of it running:
>>> Enter your topping: pepperoni
>>> Enter your topping: pepperoni
>>> Enter your topping: cheese
cheese is added
>>> Enter your topping: quit
>>> Enter your topping: quit
if topping == "quit":