Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- batches = int(input())
- for i in range(1, batches + 1):
- flour = False
- eggs = False
- sugar = False
- have_all = False
- ingridiens = ""
- while True:
- ingridiens = input()
- if ingridiens == "flour":
- flour = True
- elif ingridiens == "eggs":
- eggs = True
- elif ingridiens == "sugar":
- sugar = True
- have_all = flour and eggs and sugar
- if ingridiens == "Bake!":
- if not have_all:
- print(f"The batter should contain flour, eggs and sugar!")
- else:
- print(f"Baking batch number {i}...")
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement