|
|
|
|
|
|
[10, 100] [10, 100] |
|
|
[100, 81, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100] [100, 81, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100] |
[(-10, 100), (-9, 81), (-8, 64), (-7, 49), (-6, 36), (-5, 25), (-4, 16), (-3, 9), (-2, 4), (-1, 1), (0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25), (6, 36), (7, 49), (8, 64), (9, 81), (10, 100)] [(-10, 100), (-9, 81), (-8, 64), (-7, 49), (-6, 36), (-5, 25), (-4, 16), (-3, 9), (-2, 4), (-1, 1), (0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25), (6, 36), (7, 49), (8, 64), (9, 81), (10, 100)] |
|
|
|
|
[100, 81, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100] [100, 81, 64, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100] |
|
|
[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] |
[-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7] [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7] |
15 15 |
|
|
x |--> x + 8 x |--> x + 8 |
[y == 1/3*x - 2/3] [y == 1/3*x - 2/3] |
x |--> 1/2*x - 3/2 x |--> 1/2*x - 3/2 |
1/2*x + 13/2 1/2*x + 13/2 |
1/2*x + 5/2 1/2*x + 5/2 |
[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] |
[-3/2, -5/4, -1, -3/4, -1/2, -1/4, 0, 1/4, 1/2, 3/4, 1] [-3/2, -5/4, -1, -3/4, -1/2, -1/4, 0, 1/4, 1/2, 3/4, 1] |
|
|
List comprehension is a very useful way to express mathematical ideas. It is a way of creating lists from other lists.
It has the structure [f(x) for x in [some list]] where f(x) can be a previously defined function or just some general expression:
|
|
|
|
|
|
|
|
|
|
Here's an idea for illustrating inverses:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[0, 1/2, 1, 3/2, 2, 5/2, 3, 7/2, 4, 9/2, 5] [0, 1/2, 1, 3/2, 2, 5/2, 3, 7/2, 4, 9/2, 5] |
|
|
Answer the following with
|
|