Folks,

I am running SAGE Version 3.0.5, Release Date: 2008-07-11 compiled from 
the Ubuntu package source package sagemath_3.0.5dfsg-2ubuntu1 on my AMD 
64 PC running a 2.6.27-11-generic Linux kernel with Kubuntu 8.04 and KDE 
4.2.

I am going through the tutorial and have just found a snag.

In section 2.3 of the Sage Tutorial, we are asked to define the function 
is_even. My difficulty is that after typing in the statement,

return n%2 == 0

I still get the four dots on the left, meaning that the function 
definition is not closed. A transcript of what happens on my console is 
given below:

========
sage: def is_even(n):
....:     return n%2 == 0
....: is_even(2)
------------------------------------------------------------
    File "<ipython console>", line 3
      is_even(Integer(2))
            ^
SyntaxError: invalid syntax
========

Can someone please tell me what is going wrong? (I would hate to think 
that parts of sage are not working as they should, and hope that it is 
something that I have omitted.)

In short, how do I let sage know that a function definition is being closed?

Thanks.

Chandra

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to