“Make it matter” for students by experimenting with new and interesting topics for assignments and projects, and by using varied examples in your lectures and other materials. Students are more likely to persist in the face of a challenge when what they are learning is relevant to their life experiences and goals. Use examples that have broad appeal, place assignments in contexts that interest students, and explain how a particular idea is used in different contexts.

Some suggestions

Don’t assume what’s meaningful; find out! Don’t rely on your notion of what’s interesting and meaningful, and certainly don’t rely on stereotypes. Find out from your students--and from the students you want to recruit--what is meaningful to them! Surveys and clicker polls are a great tools for this.

Keep keeping it real. Don’t relegate the discussion of larger context to the beginning of a course. Keep bringing students back to the real world application of what they are learning. This can be as simple as showing how a concept is used in a familiar application or program (e.g., how hash maps are used in natural language processing to predict what a user will type into a search engine).

Highlight the people. To help students see the people behind the concepts, refer to the contributions of an individual or group. A great story is Grace Hopper and her team at Harvard University finding a literal bug in one of their machines.

Examples from the collection

Resources

Markov Text Generation!

In this assignment students work either individually or in pairs to implement Markov text generation. Students must prompt the user for files to use as a model and then parse the files to create a k-th order Markov model, represented as a map of key words to the k words that can follow those words. Students then generate a random text using this map. In addition reviewing strings, dictionaries, and file i/o, this assignment requires students to design their own algorithm given basic specifications.

Fun with Functions

In this assignment students individually or collaboratively use recursion to write Python functions. Students compare the assigned recursive functions with those that were previously written (and are included with the activity). As an added support the assignment includes information about an online Python visualizer that can be used to help create a visualization of the recursive calls to facilitate deeper understanding of this fundamental CS topic. This activity is particularly useful for students who have some experience with creating functions and are interested in getting more experience and exposure to recursion.

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

Vending Machine

In this project students work independently to create a vending machine program. Using fundamental programming constructs, such as variables and conditionals, and a greedy algorithm (http://en.wikipedia.org/wiki/Greedy_algorithm), students are to construct a program that calculates the minimum number of coins necessary to make change for a particular purchase. This program introduces the concept of a greedy algorithm within the context of an example that is well-known among computer scientists (i.e. making change). The project is ideal for students who are both new to algorithms and are looking for practice with fundamental programming constructs.

Garden 2

In this project students work independently or collaboratively to calculate the area and volume of an ornamental garden. Using standard mathematical formulas in Python to calculate the area and volume of a pre-defined square plot, the students must build a program that calculates information such as the side length of the finished garden and the recommended spacing between plants. The students must use a variety of functions (such as input(), round(), and print()) to evaluate the user's input and return the proper results. As a project for primarily CS1 students, the problems outlined in the activity are suited for those with experience implementing functions and some level of comfort with implementing basic arithmetic in a programming environment. For students with limited mathematical experience this is a great way to add context around math and programming.

Engagement Excellence

Tones

In this project students create a Tone program. Using Python and knowledge of math functions, students must design a program that prompts the user for three octpch pairs. The program will convert the octpch pair into the Hz result and print the results. Optionally, the program can play the three notes using the Windows Beep function which is described at the end of the document. This assignment is particularly useful for students who are new to creating mathematical functions in Python.

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
Subscribe to Use Meaningful and Relevant Content