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.
def army_supplies(food, iron, time_elapsed): total_food = food total_iron = iron while True: if time_elapsed % 10 == 0: total_food += 1 elif time_elapsed % 100 == 0: total_iron += 1 elif time_elapsed % 60 == 0: total_food -= 1 if total_food == 0: print("you died") break elif total_iron == 0: print("you died") break time_elapsed += 1 army_supplies(100, 100, 0)