Dear Chandra,
On Mar 11, 3:32 pm, "R (Chandra) Chandrasekhar" <[email protected]>
wrote:
> ========
> sage: def is_even(n):
> ....: return n%2 == 0
> ....: is_even(2)
> ------------------------------------------------------------
Just press return a second time:
sage: def is_even(n):
....: return n%2==0
....:
sage: is_even(2)
True
The function definition is only "officially" closed by entering a
blank line.
I guess the point is that in principle it is possible to continue the
function definition (although it would be pointless), such as:
sage: def foo(n):
....: return 0
....: print 'bar'
....:
Cheers,
Simon
--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---