On Mon, Dec 31, 2012 at 7:44 PM, LFS <lfahlb...@gmail.com> wrote:
> Thank you Harald.

np, i'm just heading to a party, so, just a short answer:

> I need the simplest most intuitive
> format possible with the least number of commands.

ok, then i suggest you to use python lists, nothing else. and tell
them that there are more sophisticated solutions available. (e.g. you
cannot do calculations with vectors, but in your example this didn't
happen anyways since you were just using the property that it is a
list)

> I am still deciding
> whether to go with Sage lists or NumPy arrays.

there are 3: python lists, sage matrices, and numpy nd-arrays. don't
get confused!
numpy and sage have python lists, they are the ones created via plain
[ ... , ... ]

> P.S. I see the way to "see" whether it is a list or an array in sage is to
> use print. If you get commas, it is a list; if you don't it is an array.

no, don't rely on the string representation. that's doomed to fail in
general. what you should do, and teach them, is to use the builtin
"type" comman. i.e.

l1 = [ 1, 2, 3 ]
print type(l1)
...
l2 = np.array(l1)
print type(l2)
...

and probably most interesting for you, the online python tutor. there,
you can write simple python-only programs (for loops, ifs, lists,
tuples, functions and dictionaries) and let it execute step by step.
this is extremely good for teaching!

http://www.pythontutor.com/ (there are some examples online, but you
can insert your own)

Harald

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
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.
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to