“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

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

Making Change

In this assignment students work either individually or in pairs to write a function that generates the shortest possible list of change for a given target and list of coin values. Using recursion, students must first find the minimum number of coins required to create a value and then modify this function to return the actual coin values used. This assignment requires students to use recursion with lists. It is particularly useful for students who need additional practice with recursion.

Scrabble Scoring

In this assignment, students write a function that finds the highest scoring word that can be formed from a list of letters, as in the game Scrabble. Students must use recursion, list comprehension, and lambda functions to find all the possible words that can be formed from the given list of letters. In addition to reviewing recursion and lists, this assignment requires students to decompose and document their code. This activity is particularly useful for students who are new to recursion and lists.

Picobot

In this assignment, students work either individually or in pairs to create rules for Picobot, a robot that traverses an environment. Students must create regular expression-like text rules that make Picobot traverse the entire area starting in a random position and traversing a maze. For extra credit, students can create the smallest possible rule sets. This assignment requires students to think algorithmically without the use of code and to troubleshoot the algorithms they think of. It is particularly useful for students who are new to programming and need additional practice decomposing problems.

Alien Robots!

In this lab students work either individually or in pairs to create a game of their choosing using the VPython library. To start, students are given a basic program that shows a simple alien with limited control from the user. Students are required to make incremental changes to this program, adding more complex graphics and controls to make a more interesting game. This lab reviews classes and graphics, as well as requiring students to think about the control flow for their game. It is particularly useful for students who are new to classes and need additional practice designing classes, as well as writing methods and debugging code.

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

Virtual Art

In this lab students write ten methods for a Date class that stores information about the day, month, and year. Students must write methods to check whether two Dates are the same, find the next and previous Dates, find the Date some number of days in the future or past, find whether a Date is before or after another Date, find the number of days between two Dates, and find the day of the week of a Date. This lab requires students to work with classes, comparative methods, and loops. It is particularly useful for students who are new to designing classes.

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.

Subscribe to Use Meaningful and Relevant Content