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 survival(food, iron): seconds = 0 while food > 0 and iron > 0: seconds += 1 food -= 1/60 iron -= 1/1000 if seconds % 10 == 0: food += 1 if seconds % 100 == 0: iron += 1 if food <= 0: print("you die of starvation") if iron <= 0: print("you die of iron deficiency")