Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- time = 0
- population = 1000 # initial population
- growth_rate = 0.21 # 21% growth per minute
- while population < 2000:
- population = population + population * growth_rate
- print population
- time = time + 1
- print "It took %d minutes for the bacteria to double." % time
- print "... and the final population was %6.2f bacteria" % population
Add Comment
Please, Sign In to add comment