# Unplugging the Hour of Code (Part 2)

2

In this post I’d like to share another unplugged activity that was inspired by a comment and memory from Doug Peterson’s (@dougpete) university course on this post.

As you are aware, it is Hour of Code week. It is also Computer Science Education Week and I’d like to raise more awareness about CS so please enjoy Part 2 of my Unplugged Hour of Code series.

At school we are learning about Data Management in math. Last week students created roller coaster tracks for marbles using cardboard, hot wheels, etc. They coded an app to track data and connected a Makey Makey to activate the timer switch. Our goal was to track authentic data, which is to be graphed this week (as well as computing mean, median and mode). Friday wrapped up with students having roughly 30-45 pieces of data from the multiple simulations they ran with the marbles.

This week we must crunch the data, look for bias and make opinions, assumptions and conclusions about our roller coasters.

Before we can calculate the median, we need to sort the data. This task is quite simple using technology. I can click a column title in a spreadsheet and sort until my heart is content.

But how does the computer do that? Here are a few sorting algorithms.

In conjunction with Hour of Code, CS Education Week and Data Management, our goal will be to have kids act out a few sorting algorithms.

Human Bubble Sort vs. Human Quick Sort

Learning Goal: To understand and explore different ways to sort numerical data from smallest to greatest.

Provide students with a number. You may wish to randomly assign them with numbers, or just have them pick an arbitrary number from some range, say 1-50.

Show students these videos on Bubble Sort and Quick Sort.

Have students stand up and form a line sorted randomly by their number. You may wish to have them write it on a piece of paper.

Instruct them, with your guidance, to perform Bubble Sort. Time the activity (another added element of authentic data tracking). You may wish to do this a few times and calculate the “mean” time.

Next, have students randomly line up again and perform Quick Sort. Time them again and determine a good average.

Which sorting algorithm is more efficient with your data? When might you use the other algorithm? Have students research other sorting algorithms (merge, heap, etc.).

Pose some questions to consider:

1) What else can we sort with these algorithms?
2) Can you determine another algorithm to sort objects instead of numbers?
3) Why is it important to be efficient when sorting data?
4) How would removing one number change the mean, median, mode and time spent sorting data?

Celebrate Hour of Code Week while doing Data Management, without technology. This activity gets kids up and moving. Great when performed in the hallway – and would be super cool if performed on a stage for an assembly in the gym.

If you would like to see a more detailed lesson plan, click here.