## Introduction: Tinkercard Codeblocks

The Instructions
Build Some Context Around Math & Coding
How can mathematicians or computer scientists be more like artists? Making patterns is one thing they all have in common. A pattern is a repeated decorative design.The study of pattern is the foundation of mathematics. It is the thread that binds all parts of mathematics together. In coding – like in math – patterns are made from ideas. Mathematicians and computer programmers use patterns to express themselves and to make their work more efficient. For example, they might use loops to allow for the repetition of a sequence of code multiple times. Artists and crafts people such as the ones in southern Africa, produce objects with cultural patterns. The steps they take to create the patterns is similar to the way designers create 3D models on computers.Have students look at some examples of patterns in cultural artifacts such as South African baskets and hats. Have students or small groups of students pick one example and have them identify a shape pattern that follows a given rule. For example, triangles are common shapes in Zulu baskets. Students can use these shape patterns to explore triangular numbers.

## Supplies

WHAT YOU'LL NEED
Computers, Internet, Tinkercad (a free, easy-to-use, web-based 3D CAD design tool); optional, but useful: 3D printer, color printouts of the Codeblocks used in this lesson.

## Step 1: Give Students Some Code to Play With

Give Students Some Code to Play With
One of the best ways to introduce coding to students is to have them play or tinker with existing code. Also, introduce relevant vocabulary to them such as variables, transformation (rotation, scale) and repetition.Discuss terms such as “variable” which is stored in a code file and, when paired with an associated symbolic name or identifier, contains some known or unknown quantity of information referred to as a “value”. “Repetition” means repeating a sequence of instructions a certain number of times, or until some specific result is achieved. A “loop” is a sequence of instruction (algorithm) that is repeated until a certain condition is reached. By repeating an instruction, students can generate patterns. Have students start using Codeblocks in Tinkercad. The first step (for teachers) is to set up an account for each student. Once students are logged in, they have to choose Codeblocks from below their profile image on the main web page. On the next screen, they can choose “New Design.”When they are inside the Codeblocks editor, they can copy the script below to make a random shape generator.