Guest User

Untitled

a guest
Jun 18th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. time = 0
  2. population = 1000 # initial population
  3. growth_rate = 0.21 # 21% growth per minute
  4.  
  5. while population < 2000:
  6. population = population + population * growth_rate
  7. print population
  8. time = time + 1
  9.  
  10. print "It took %d minutes for the bacteria to double." % time
  11. print "... and the final population was %6.2f bacteria" % population
Add Comment
Please, Sign In to add comment