Course Level
CS1
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type
Assignment
Synopsis

In this assignment students work either individually or in pairs to write functions that encode and decode a Caesar cipher, along with several other sorting and string problems. Students must write functions that encipher a message by rotating the letters and decipher a message by looking at letter frequencies in the enciphered message. Additionally, students must write functions that sort a binary list, sort a general list, find the number of characters shared between two strings, and find the least common subsequence of two strings. In addition to requiring students to work with recursion, strings, and list comprehension, this assignment requires students to design their own algorithms. It is particularly useful for students who are comfortable with the topics covered but need additional practice designing algorithms.

Recommendations

Integrate pair programming when it is appropriate for students to collaborate on a lab, assignment, or project. The “driver” controls the mouse and the keyboard, while the “navigator” makes suggestions, points out errors, and asks questions. Partners routinely switch roles to gain the benefits of each role.

Engagement Highlights

Relates the CS topics to other types of problems in science as a way of providing a Meaningful and Relevant Context. Students are given significant algorithmic freedom as a way of Incorporating Student Choice. Relates the least common subsequence problem to concepts from biology to create Interdisciplinary Connections to CS.

Materials and Links

Computer Science Details

Programming Language
Python

Material Format and Licensing Information

Creative Commons License
CC BY-NC