Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. #!/bin/python
  2.  
  3. def time_calc(acres, homes, current, target):
  4.     time = 0
  5.     peasants = acres*25 + 10*homes*acres - current
  6.     while current < target:
  7.         soldiers = 1.5/float(100) * peasants * 1.1
  8.         peasants -= soldiers
  9.         current += soldiers
  10.         time += 1
  11.     return time
  12.  
  13. time_calc(1000, 0.5, 0.33*1000*25, 0.75*1000*25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement