Advertisement
simeonshopov

Baking

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