In this lab, students demonstrate their understanding of while loops and computation by simulating populations of rabbits and foxes in an ecosystem. Students are provided with formulas to compute populations from one year to the next, using previous populations of rabbits and foxes for each. This activity is a good simulation for students beginning to learn about while loops.
For more information on how this lab fits within the scope of the course, please see the following course schedule and syllabus here: (http://mathcs.pugetsound.edu/~aasmith/cs161/). Search "Rabbits & Foxes".
By putting while loops in the context of a simulation in an ecosystem, this activity creates a Meaningful and Relevant Context. Through the use of ecology simulations, this activity creates an Interdisciplinary Connection to CS.