Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/python
- def time_calc(acres, homes, current, target):
- time = 0
- peasants = acres*25 + 10*homes*acres - current
- while current < target:
- soldiers = 1.5/float(100) * peasants * 1.1
- peasants -= soldiers
- current += soldiers
- time += 1
- return time
- time_calc(1000, 0.5, 0.33*1000*25, 0.75*1000*25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement