#5500: add remark to tutorial to make defining functions at the command line
much
clearer
---------------------------+------------------------------------------------
Reporter: was | Owner: tba
Type: enhancement | Status: new
Priority: major | Milestone: sage-3.4.1
Component: documentation | Keywords:
---------------------------+------------------------------------------------
{{{
Folks,
I have one suggestion for the Sage Tutorial.
In Section 2.3, after the text
==
sage: def is_even(n):
... return n%2 == 0
==
I suggest that you add an instruction to press [Enter/Return/Newline]
after the
... return n%2 == 0
to conclude the definition.
When I followed the instruction exactly as it is given, without
inserting a blank line, I got an error like this:
===
sage: def is_even(n):
....: return n%2 == 0
....: sage: is_even(2)
------------------------------------------------------------
File "<ipython console>", line 3
sage: is_even(Integer(2))
^
SyntaxError: invalid syntax
===
It was only after I emailed sage-support that I was told I needed to
insert a blank line to conclude the definition. Because I am new to
Python, this was not old hat to me. Hence my suggestion to append:
====
Insert a blank line here by pressing [Return or Enter]
(after the line
... return n%2 == 0)
====
Many thanks.
Chandra
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5500>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---