Weight: 300 points. Please hand in via online
dropbox.
-
Book problems: 8.7.1, 9.5.4, 9.5.5 (part 1), 9.5.7 (think carefuly about your contract),
10.1.6, 10.1.7, 10.2.9.
-
Develop a function that takes a list of "posn" positions and returns the list of x-coordinates
for these points. Make sure that the order of your input points and the output x-coordinates
match. Next, develop a function that takes a list of "posn" positions and returns a list
of distance-from-origins for each of these points. Again, make sure you get the order of the
output list right.
-
Develop *one* function that takes a list and a boolean. If the boolean is true,
this function returns only the even elements in the list. If the boolean is false,
this function returns only the odd elements of the list. Note, the function must
always return a valid list for all inputs.
For example, in the list 'rabbit, 'dog, and 'ringo, the even elements are just 'dog, and the odd elements are 'rabbit and 'ringo.