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

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.

Recommendations

Make the Context even more Meaningful and Relevant by either adding a novel premise (such as a vending machine that dispenses tokens for transportation) or make it a calculator for purchasing items from an online vendor (such as Amazon.com).

Engagement Highlights

Employs Meaningful and Relevant Content by connecting the concept of efficient algorithms and programming fundamentals to the familiar topic of processing and handling money. Provides Effective Encouragement by breaking task apart into manageable pieces and offering realistic guidance along the way.

Computer Science Details

Programming Language
Python

Material Format and Licensing Information

Creative Commons License
CC BY-SA