you are helping an army. if you don't send supplies, you would die. if the food drops to 0 all would die. if you run out of iron, the army could not fight. you will start with 100 food and 100 iron. it takes 10 seconds to produce 1 food and 100 seconds to produce 1 iron.The army eats 1 food every 60 sec.you decide how many food we produce.
def foodproduction(a): return a*10 def ironproduction(b): return b*100 def foodconsumption(c): return c*60 def supply(a1, b1, c1): food = 100 iron=100 while food>0 and iron>0: foodproduction(a1): ironproduction(b1): foodconsumption(c1): food = food - foodconsumption(c1) + foodproduction(a1) iron = iron - ironproduction(b1) if food <= 0: print("You ran out of food, you died") elif iron <= 0: print("You ran out of iron, you died") else: print("You survived")