The lab is done in groups of 2 (preferred) or 3. In the beginning of each file please write (in comments) the names of all group members.
At the end of the lab please send me and your group partner(s) all your Racket files as e-mail attachments. My e-mail is elenam at morris.umn.edu. The subject of your e-mail must be "1301 Lab 5" followed by "Final" or "Not final", depending on whether this is a final submission or you are still working on it. If you need to finish it, make sure to set up a time with your group partner(s) to finish the lab.
In this lab you will be experimenting with lists and functions that take lists. Study the example that we did in class before you start on the exercises. Also, check out examples in the beginning of Ch. 10 in the textbook.
Make
sure to write tests (using check-expect
) for all
non-image functions (ideally, before you write the function itself).
You can do lab exercises in any order. The tasks are as follows:
count-odd
that takes a list of
numbers and returns the number of odd elements in the list. Some
examples include:
(check-expect (count-odd (cons 3 (cons 2 empty))) 1)
(check-expect (count-odd empty) 0)
You need to write more tests.