Posted: Wed Oct 22

Due: Thursday 10/23 10:00am

Submission name: work15.rkt

Write a Racket program with the following features:

  • A function (randList n maxValue) that will create a list if 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, 50).

  • Using filter, write code that will:

    • Return a list containing only the odd numbers in your list.
    • Return a list containing only the numbers greater than or equal to 25.
    • Return a list containing only the numbers less than 25.

Example output:

list: '(46 40 4 34 15 29 30 20 49 42 10 16 35 8 11 30 20 19 48 17)
odds: '(15 29 49 35 11 19 17)
larger half: '(46 40 34 29 30 49 42 35 30 48)
smaller half: '(4 15 20 10 16 8 11 20 19 17)