# Algorithms – Teaching coding structures to 6th grade

In my Scratch / CS unit for my 6th graders, I broke the unit up into three mini-projects and then one final project. I really wanted to home in on the students’ understanding of three big structures of algorithms: variables, if/then decisions, and loops. With these basic building blocks, you can create an algorithm that does almost anything you want.

VARIABLES

The prompt for variables was:

“Write a Scratch program that asks you for the cost of an item, and then tells you the total cost with tax. Tax in the city of Fort Collins is 7.4%. To get an advanced grade, ask for the cost of two items, and say the total cost of both items with tax.”

We did some mini-lessons on variables and how to calculate tax embedded in the work time. These are some of the programs kids submitted.

Tax Hip Hop Dancer

Tax Soccer Cat

IF/THEN

The second mini-project was a project on if/then decisions. I’ll post a full lesson plan later but this was the prompt for the project.

“Create a program that asks at least 2 questions and uses if/then or if/then/else blocks to find the perfect gift for a friend. Your project submission should also include a flowchart.”

Example student flowchart, created on lucidchart.com

Christmas Pony Program

LOOPS

The third project seemed to be the most fun for kids. The prompt was:

“Create a repetitive geometric design using the pen tools and loops. Your program must make at least three unique designs.”

I gave the students some example programs and a rubric of:
– Programs with loops, very similar to the examples = 2
– Programs with loops, significantly modified from examples = 3
– Programs with loops that are unique, not modifications = 4

Here are some of their examples.

Flower and Other Designs

So Many Stars

The students had a lot of fun with the mini-projects. Their final project is to make an original creation using all three programming structures – variables, if/then, and loops. I added a writing component as well, and allowed them to work with a partner. I used this time to also weave in lessons on ethical use of online resources. So far I’m really pleased with how it’s coming out, and I’ll post more about this final project later!