from math import exp
import matplotlib.pyplot as plt
from random import uniform
def cont_log_time(N,r,K):
return N + (N*r*(1-((N/K))))
lag = input("What is the lag?")
N = input("What is the initial population size?")
r = input("What is the instantaneous growth rate?")
K = input("What is the carrying capacity?")
time = input("How long should the population grow?")
pop_size = [N] * lag
print pop_size
for years in range(lag,time):
pop_size.append(cont_log_time(pop_size[-lag], r, K))
print pop_size
print range(time)
plt.plot(range(time), pop_size)
plt.show()