🍛 Hotel Kitchen · Mission 6 of 6

👑 Dinner Rush

Boss mission! It's the dinner rush and stock is low: 2 dosas, 3 idlis, 1 vada, 5 teas.

Your mission

  1. Make dishes, prices = [40, 30, 20, 10], stock = [2, 3, 1, 5], served = [] and bill = 0.
  2. Take orders by dish number until the answer is 0.
  3. Serve a dish only if there's some left, taking it from the stock and adding its price to the bill. If not, say "Sorry, <dish> is sold out!"
  4. At the end, take 10% off if the bill is more than Rs 100, and say "Total: Rs <bill>".

Getting the mission ready…