Due: Tuesday 10/15 10:00am

Submission name: work15.rkt

Reminder: Test Friday, 10/18

Write a Racket program with the following features:

If you need some assitance with this assignment, check out the list seciton of the textbook, as well as the solution to yesterday’s work

  • A function (randList n maxValue) that will create a list of n random integers in the range [0, maxValue).
  • Use randList to Create a variable to store a random list of 20 integers in the range [0, 100).
  • Using foldl, write code that will:
    • Return the sum of all the elements in the list.
    • Return the amount of elements in the list.
    • Return the smallest value in the list.
  • Using filter and foldl, write code that will:
    • Return the sum of the the odd numbers in your list.
    • Return the amount of the numbers greater than or equal to 50.

Example output:

list: '(65 46 76 49 28 25 51 18 16 5 80 44 30 93 60 69 25 7 46 94)
sum: 927
count: 20
smallest 5
odds: '(65 49 25 51 5 93 69 25 7)
sum: 389
larger half count: 16