This is on the way; see http://trac.sagemath.org/sage_trac/ticket/3587.
However, for now you will get various errors. I am surprised that you
got a Sympy error; did you use Sympy along the way? Since you are
coming from the notebook, perhaps you accidentally were using it
somehow...
I get the following:
sage: var('i,x')
(i, x)
sage: sum(x^i,(i,0,10))
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/Users/...__sage_init_sage_0.py in <module>()
TypeError: 'sage.symbolic.expression.Expression' object is not
iterable
- kcrisman
On Oct 8, 9:33 am, "Kim, In-Jae" <[email protected]> wrote:
> Hello,
>
> I was wondering how I can write the polynomial, 1+x+x^2 + ...+x^10, using
> summation.
> I tried
> sage: var('i,x')
> sage: sum(x^i, (i,0,10)),
>
> but I got the following error message:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/sage/sagenb/sage_notebook/worksheets/matrix89/26/code/6.py",
> line 7, in <module>
> sympy.sum(x**i, (i,_sage_const_0 ,_sage_const_10 ))
> File "", line 1, in <module>
>
> NameError: name 'sympy' is not defined
>
> Thank you.
>
> In-Jae
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---