Advertisement
aneliabogeva

Cookie factory

May 20th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. batches_counter = int(input())
  2.  
  3. contains_eggs = False
  4. contains_flour = False
  5. contains_sugar = False
  6.  
  7. for i in range(1, batches_counter+1):
  8. ingredient = ''
  9. while ingredient != contains_eggs and ingredient != contains_flour and ingredient != contains_sugar:
  10. ingredient = input()
  11. if ingredient =='eggs':
  12. contains_eggs = True
  13. elif ingredient == 'flour':
  14. contains_flour = True
  15. elif ingredient == 'sugar':
  16. contains_sugar = True
  17. elif ingredient == 'Bake!':
  18. if contains_sugar and contains_flour and contains_eggs:
  19. print(f"Baking batch number {i}...")
  20. break
  21. else:
  22. print("The batter should contain flour, eggs and sugar!")
  23. contains_eggs = False
  24. contains_flour = False
  25. contains_sugar = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement