I am quite new in sage as well as in programming, so please if you explain this, please do it thouroughly.
Let's assume we have a simple function like F(x,y)=x+y. Is it possible to create a list, something like (x,y,F)? To make clearer a list in the form of (value_of_x_coordinate,value_of_y_coordinate,value_of_function) for instance (1,1,2) or (1,2,3). If this is possible, how can we transform the coordinates x,y by operating somehow on the list e.g adding on both x and y, a number N.
asked Jul 04 '12Cosmos
1 ● 2
List comprehension is a way of constructing lists that is very readable and concise. It mimics set builder notation from mathematics:
try these out and see what they produce.
You can now modify your list or add to it any way you want. For example:
Asked: Jul 04 '12
Seen: 73 times
Last updated: Jul 04 '12
powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.