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.


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


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

Example student flowchart, created on

Christmas Pony Program


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!


Tags: , , , , ,

About dupriestmath

I'm a former software engineer who has taught middle school math and computer science for the past 6 years. I believe every kid has the right to be a thinker. I started this blog to save resources for integrating programming in the Common Core math classroom. I also use it to save my lessons and reflections from teaching budding computer scientists! Coding has transformed how I teach and think. You'll love what it does for you. You should try it.

One response to “Algorithms – Teaching coding structures to 6th grade”

  1. techkim says :

    This is great – thanks for sharing!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: