CS1

A Game!

In this assignment students create a game called 'Cowboy, Ninja, Bear' in Python. By creating a game in segments, students are tasked with building and testing incremental features of the game until all possible permutations within the game (using the predefined win-state outcomes) have been successfully met. The activity requires students to use a design document to outline and support their development process.

Iteration

In this assignment students are asked to respond to "customer requests" such as writing a program which shows the effects of compounded interest as well as developing an algorithm for the number of times a digit appears in different numbers.

Selection Statements- Responding to Customer Requests

In this assignment students are asked to respond to two customer requests. First they must create a program to analyze the body mass index of Olympic athletes. Second, they are asked to create a calculator script which helps with errors.

First Program

In this assignment students create functions to perform calculations in Python. Using data related to driving a car and time, students must create functions that tell the user how many miles-per-gallon or the total number of milliseconds occur within a particular day. This assignment is ideal for students who want more practice creating functions and calculating values.

Analyze Customer Data

In this lab (Lab 14) students work individually or collaboratively on analyzing customer data. Using a list or dictionary of fake customer data, students sort and print different values. Students must create functions to perform actions, such as getting various distributions (gender, birth, and purchase) within the data set.

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

Sets and Dictionaries to analyze movies

In this lab (Lab 13) students work individually or collaboratively on sets in Python. This lab introduces the concept of sets through analysis of two movies using data from the Internet Movie Database (IMDB). Students create a dictionary with values from these movies and process the info to determine such things as intersections between movies on actors and co-actors. This lab was inspired by the work of Bill Punch and Richard Enbody, Michigan State University.

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

"Green Eggs and Ham" -Using lists for text analysis

In this lab students work individually or collaboratively on evaluating text. Using lists and dictionaries, students perform various functions on the text within Dr. Seuss's Green Eggs and Ham children's book. This lab is ideal for students looking to gain additional experience with lists and dictionaries.

Engagement Excellence

Functions

In this lab students are encouraged to work collaboratively to create various functions. This activity requires students to create functions that performs various calculations on entered values. The first function calculates molecular weight of hydrogen, carbon, and oxygen; the second calculates body-mass index (bmi); and the third the Collatz conjecture. This lab is ideal for students looking for more practice creating functions.

Caesar Cipher-Strings, Conditionals, Loops

In this lab students collaborate on the creation of a Caesar cipher in Python. This lab covers the concept of a rotation (Caesar) cipher, including encoding and decoding strings of text. This lab is ideal for students looking to practice working with strings, functions, conditionals, and loops in the context of encryption/decryption.

ASCII Art

In this assignment students work either individually or in pairs to create ASCII art using loops. Students must write functions that print a rectangle, a triangle, bumps of increasing size, a diamond, and a striped diamond. In addition to requiring students to use loops, this assignment reviews basic parameter passing. It is particularly useful for students who are new to loops.

Subscribe to CS1