Quantcast
Channel: ASKSAGE: Sage Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 3

Variable range()

$
0
0
Hello, I have the following code: def f(a,b,c,x): xtemp=a for i in range(b,x): xtemp=xtemp-xtemp*c return xtemp var('t') plot(f(10000000,1,0.01,t),3,20) and got the error TypeError: range() integer end argument expected, got sage.symbolic.expression.Expression. I understand that range does nor support 'var' object, but how can I have a variable range in this kind of function?

Viewing all articles
Browse latest Browse all 3

Trending Articles