Of course the solutions above here will work. But an important thing that 
also should be mentioned is that sage is python+ a lot of mathematics+ some 
additional syntax. The question you asked is possible in almost every basic 
programming language and also very easily possible using python. You should 
consider going trough a basic python tutorial (using sage instead of 
python) to get familiar with all the programming possibilities in sage.

-- 
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
URL: http://www.sagemath.org

Reply via email to