In this assignment, students use an ancient method for finding prime numbers known as the Sieve of Eratosthenes to determine all the prime numbers in a range of numbers. Students being with a list of integers, and maintain an array of booleans to maintain whether a number is prime. This activity is a good introduction to more complex mathematical logic used in programming.
For more information on how this homework fits within the scope of the course, please see the following course schedule and syllabus here: (http://mathcs.pugetsound.edu/~aasmith/cs161/). Search "Sieve of Eratosthenes".
By putting the activity in the context of a common mathematical function, and in the context of a common class of integers, this activity creates a Meaningful and Relevant Context.