Course Level
CS1
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type
Assignment
Synopsis

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.

Recommendations

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".

Engagement Highlights

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.

Engagement Practices Employed

Materials and Links

Computer Science Details

Programming Language
Java

Material Format and Licensing Information

Creative Commons License
CC BY-NC-SA