| 1 | initial version |
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
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.