Chris Pollett>Old Classes>CS210, Spring
1999>Hw2 -- Alternate
CS 210
Alternate HW#2
Due start of class, Tuesday,
Mark 2, 1999. This homework will be graded out of 10. Below are some
simple problems to try to get people up to speed in Lisp. You should
as always show both your commented code and print-outs which establish it
works.
- Write a program which takes in values from the user into a four by four
array then prints them out the elements of the array nicely formatted.
You should look up the make-array and aref commands to do this. You will
probably want to use dotimes.
- Define a structure person with attributes: name, height, width, weight,
sex, and eye-color. Use defstruct to do this. Give reasonable default
values for these attributes. Create several instances of person. Put them
in a list named people using the (list ...) command. Write a program
which takes a list of person's and outputs in a nicely formatted way
their name's and eye-color's. Test your function on the people list you
created above.