On Fri, Dec 14, 2012 at 12:31 PM, Santanu Sarkar <
[email protected]> wrote:
> Is there any function in Sage by which this kind of symbolic
calculation
> is possible?
>
> s=0
> for i=1 to m
> if(i>a+t)
> s=s+2i
> else
> s=s+t
>
> m,a,t are non negative integers.
I have no idea what you're asking, but you might find this snippet of Sage
code relevant:
m = 10; a = 5; t = 3
s = 0
for i in [1..m]:
if i>a+t:
s += 2*i
else:
s += t
print s
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
>
>
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.