My discrete math class was playing with sequences today.

Example 1)
a(n)=1/n**2
for I in range(1,10):
    show(a(I))

Example 2)
[a(n) for I in range(1,10)]

These methods work fine. I'm confused on how to write function for
a(n) where I can just input a list, process the list and output a new
list with the sequence evaluated.

So, if a(n)=n**2 and the input is [1,2,3] the output should be
[1,4,9].

TIA,
A. Jorge Garcia
http://shadowfaxrant.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"sage-edu" 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-edu?hl=en.

Reply via email to