Samuel Gaehwiler wrote:
> hi,
> 
> I use sage (in notebook mode) for basic calculations on a daily basis.
> I also like to print out my calculations and hand it in with my
> exercise.
> Since the people who correct them here at the ETH university in Zürich
> are not familiar with sage, I would like to print every result with
> the variable-name in front of it.
> 
> i.e.
> sage> a_2 = 2/3+1
> sage> show(a_2)
> 
>   a_2 = 5/3  (nicly formated, as if typsetted in latex)
> 
> is this somehow possible? (is there an argument for show() I've
> missed, or maybe a little phyton script?)

I guess I should add that I don't think the exact syntax you have will 
work.  Once a_2 is passed to the show function, I don't think the show 
function knows where it came from, i.e., the show function has access to 
the *value* of a_2, but doesn't know what variable name was actually passed.

The other solutions had the variable name passed to the function as a 
string, which, of course, would be different because there you are 
passing in a string, the name of the variable.

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to