Ask Your Question

Revision history [back]

A lambda function might be the quickest workaround:

plot(lambda t: f(10000000,1,0.01,t),3,20)

And if you don't want to get the deprecation warning about range not taking float inputs, you could modify your function to:

def f(a,b,c,x):
    xtemp=a
    for i in range(b,ceil(x)):
        xtemp=xtemp-xtemp*c
    return xtemp