SHARE
TWEET

Baking

simeonshopov Oct 21st, 2019 (edited) 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top