Huffman Compression

In this assignment students work either individually or in pairs to implement the Huffman Compression. Before beginning to code, students must write a software design document that plans the functions that they will use. The program itself must prompt the user for a file and then compress the file using Huffman Compression. In addition to reviewing trees and dictionaries, this assignment requires students to carefully design and test their code. It is particularly useful for students who are new to trees and need additional practice designing large programs that involve more complex data structures.

RNA Folding

In this assignment, students write a function that finds the maximum number of nucleotide matches on a folded RNA string. Using recursion, students must find the optimal folding for an RNA string by pairing up different combinations of indices in the string. They then optimize their function with memoization. This assignment requires students to work with recursion, memoization, and lists.

Creating the Mandelbrot Set

In this lab students work either in pairs or individually to write a program that displays the Mandelbrot set. Students incrementally write functions that help them deal with nested loops, complex numbers, and graphics until they have a program that can display and zoom in/out of the Mandelbrot set. There are optional parts to the assignment that deal with visualizing escape velocities and "Mandelbrotifying" an image. In addition to reviewing nested loops and graphics, this lab requires students to use constants and use incremental design. It is particularly useful for students who need additional practice with nested loops.

Python Turtles

In this lab students work either individually or in pairs to create three images using turtle graphics. Students must draw a spiral, a recursive tree, and the Koch Snowflake. In addition to reviewing turtle graphics, the lab requires students to create functions that can accept different parameters and to use recursion. The lab is particularly useful for students who are new to graphics and recursion.

Subscribe to Baccalaureate Colleges - Liberal Arts