Millisoft "Shapes" Revisited

In this assignment students update an existing graphics class. Students must add methods to translate, rotate, scale, and flip arbitrary shapes using turtle graphics. They then use this class and additional subclasses to draw an image of their choice. In addition to reviewing graphics, this assignment requires students to work with a class hierarchy. It is particularly useful for students who need additional practice with classes.

Exceptional Encryption

In this assignment students work either individually or in pairs to implement and crack a simple version of RSA. As subproblems in generating RSA keys, students must generate random primes, calculate Euler's totient, and find the greatest common divisor of two numbers using Euclid's algorithm. They must then encrypt/decrypt messages using these keys and use brute force as an attack against encryption. In addition to reviewing brute force and recursive algorithms, this assignment requires students to write a program with multiple helper functions.

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.

Secret Sharing and Lagrange Steganography

In this assignment students implement a basic security protocol in which a key is distributed to multiple parties such that a certain number of parties must combine their knowledge to learn the full key. In addition, this assignment reviews the concepts of random number generation and floating point numbers, as well as requiring students to design their own decomposition. It is particularly useful for students who need practice decomposing problems.

Engagement Excellence

Nim!

In this assignment students work either individually or in pairs to create the game Nim. Nim is a game in which two players take turns removing stones from piles with the goal of forcing the other player to take the last stone. Students must program the game from the ground up, creating their own decomposition design, as well as error checking user input. This assignment requires students to think carefully about design, documentation, and debugging. It is particularly useful for students who need practice writing larger programs.

Mastermind!

In this assignment students work either individually or in pairs to implement the game Mastermind. Mastermind is a game in which the player has to guess a sequence of randomly chosen colors based on feedback about their previous guess. Students must program the game from the ground up, creating their own decomposition design, as well as error checking user input. This assignment requires students to think carefully about design, documentation, and debugging. It is particularly useful for students who need practice writing larger programs.

The authors of this material were awarded a 2015 NCWIT Engagement Excellence Award for this assignment. Learn more on NCWIT's awards page.

Engagement Excellence

Image Compression

In this assignment students work either individually or in pairs to compress and decompress images. Students must write functions that compress and decompress black and white images represented as strings of zeros and ones. In addition to reviewing string manipulation, this assignment requires students to make their own algorithmic decisions. It is particularly useful for students who need practice designing algorithms that deal with strings.

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.

Giggle Maps

In this assignment students work either individually or in pairs to write a function that finds the shortest path between two cities in a graph. Using recursion, students must find the length of the shortest path (and optionally the path itself) between two given cities using a dictionary representing a graph of cities that only have paths from east to west. This assignment reviews one form of graph representation and a basic shortest path algorithm. It is useful for students who are new to graphs.

Revenge of the Groodies!

In this assignment students work individually to write functions that find the longest common subsequence (LCS) and sequence alignment of two given strings. First, students must modify a given function that uses recursion to find the length of the LCS of two strings to find the actual LCS. They then modify their LCS function to return the sequence alignment of the strings, strings with dashes wherever the original strings mismatch. This assignment reviews both recursion and string manipulation.

Engagement Excellence
Subscribe to HTML