TamaroCards - A Tangible Way to Compose Programs

Version 1, August 2023

PyTamaro is often used to teach complete novices. For them, writing Python code on a computer can be challenging. To support novices in reasoning about a graphic and its composition, we developed TamaroCards. Each Python function or constant is represented by a card. Functions are red, constants are blue. The cards can be arranged on a table to compose a Python expression that corresponds to a graphic.

Photo of TablePhoto of TablePhoto of Table

The PyTamaro API currently exists in three different natural languages: English, German, and Italian. Correspondingly, each TamaroCard shows its function or constant name in all three supported languages. This is ideal for multi-lingual environments.

API Documentation Pages

When using the TamaroCards, we provide each student (or student team) with the "API documentation" in the form of a few printed pages. Each page shows part of the API.

Each API documentation page shows the cards of a specific part of the API. These pages correspond to the API documentation: they explain what each function or constant does. The explanations are provided in a visual form: as annotations of parameters and return values of functions, and annotations of values of constants. This documentation should be sufficient to remember how to use the cards. No information about the implementation is needed; the visual annotations provide a complete description of each card's meaning.

The API documentation pages are not to be cut. They are to be kept whole and used as a reference by students when they try to understand the meaning of a specific card.

Printable Card Sheets

To express a computation students connect together individual cards. They can use the blue constant cards (colors and points for pinning), and they can use the red function cards.

Expressions are tree structures composed of cards. The evaluation of the expression flows from left to right. Each constant or function emits a value on its right. Function parameters enter functions from the left. Students can place cards near each other, and they can draw lines with pencil to connect the cards. We recommend putting large sheets of paper on the table, so students can easily draw between cards.

When composing or interpreting an expression, students can annotate the visual expression with the values emitted by the cards. Values of built-in types (int, float, str, bool) are written as normal Python literals. Values of PyTamaro types (Graphic, Color, Point) are drawn graphically; graphics can even be cut out from colored sheets of paper.

The four sheets contain cards arranged in a way so they can be printed and easily cut out. The sheets contain more copies of more commonly needed cards.

Note that the individual cards, unlike the API documentation, do not contain any annotations on parameters, return values, or constant values. This is akin to code: when you call a function, you just write its name, and you provide arguments, but you don't write the names of the parameters.

Individual Card PDFs

We recommend printing the above sheets and cutting out the cards. However, if needed, one can download the ZIP file which contains an individual PDF for each card.

Logo of PyTamaro

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy PolicyPlatform Version 0d7866a (Fri, 20 Dec 2024 07:46:38 GMT)