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.
import time def fight(time_passed): food = 100 iron = 100 while True: if food == 0 or iron == 0: print("you died") break time.sleep(1) time_passed += 1 food -= 0.1 if time_passed % 100 == 0: iron -= 1 print(f"food: {food:.1f}, iron: {iron}") fight(0)