Course Level
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type

The Coffee Barista Assistant assignment has students develop a tool that generates instructions to build a customer's cup of coffee. The assignment has a basic path for all students to complete, while containing additional layers to challenge high performing students. Through this programming assignment, students gain experience and proficiency with variables, conditionals, lists, and functions. By starting the assignment as an unplugged design activity, students will learn how to identify repeated patterns.


The program requires input from a user via the keyboard. This assignment is designed for students with some prior programming experiencing using variables and conditionals, and are currently learning loops and lists. Having the student combine all of these elements without prior practice of the basic language constructs might overwhelm them. 

The assignment has different challenge layers to encourage the student to attempt increasingly difficult levels of the assignment, while still making the assignment fun and engaging. A teacher can decide to present all in one assessment, or use the layers over several assessments, building on the context so that students can focus on the learning objectives.

If the student does not have basic knowledge of ingredients to make a coffee, the assignment has a hint that links to a visualization explaining the ingredients of different involved in making coffee. Students also need to have a basic understanding of I/O so their program will be able to take a customer's order.

The activity can be extended to include a checkForBadInput() function that encapsulates the logic for the data validation. Adding this function can also serve as a refactoring activity on the original solution.

Engagement Highlights

Ordering hot drinks, such as coffee, at a cafe is a familiar experience to most students, so they can focus on the programming assignment's learning objectives. 

This assignment can serve as a pre-activity to help students think about how they would design their programming solution. The teacher can get students to perform an unplug design activity that describes the workflow for taking the customer's coffee order. By having students perform the unplug design activity, they might be able to observe the repeated pattern of asking questions to the customer which could be encapsulated in the function. The teacher can ask students to use the results from the pre-activity as their guide for implementing a programming solution.

Engagement Practices Employed

Computer Science Details

Computer Science Topic(s)
conditionals (if/else)
loops (general)
Programming Language

Additional Details

Estimated Time to Complete

2-3 hours

Material Format and Licensing Information

Creative Commons License

Author's Institutional Information

Institution Type
Liberal Arts Colleges (4 yr)