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