Computer Science Education Week is held every December, in the week of Grace Hopper's birthday (December 9, 1906). She was a computer scientist and a rear admiral in the US Navy who helped make some of the first computer programming languages, so that people could write code in words instead of strings of numbers. Planning a delivery route is a real computer science problem: delivery companies use code to find short routes round a town, and a loop is how a program does the same job again and again, house after house, without writing it out each time.
Six pages of coding with no computer. Each arrow card flies the sleigh one square up, down, left or right, and the present card drops a present down the chimney of the house the sleigh is over. The sleigh may fly over houses, but never into a tall tree, a storm cloud or a radio tower. Page 1 follows short codes: circle the houses that get a present (the sleigh flies over some houses without stopping). Page 2 writes the arrows to one house, the shortest way round what is in the way; each grid has just one shortest way, so the empty cards show how many arrows to write. Page 3 delivers to two or three houses in order with arrows and present cards, the fewest arrows. Page 4 has one wrong card in each code: cross it out and draw the right card under it. Page 5 brings in the repeat loop along a street: follow two loops and circle the houses, then write a loop that delivers to the houses given. Page 6 writes long codes shorter with a loop, then, for 3rd grade, follows loops inside loops and counts how many cards run. Each kind of problem starts with a worked example.
Tape a grid on the floor with paper houses, chairs for trees and a gray cloud cut from card. One child flies the sleigh while another holds up arrow cards and the present card, the class saying each step out loud. Before page 5, act out a loop along a row of houses: "repeat 4 times: step, step, drop a present" and count the presents together. On page 6, ask how the cards could be counted without touching every one, so students see the loop as groups: repeat 2 times, 5 cards each time, is 10 cards.
Draw a small town on squared paper: a few houses with numbers, some trees and a cloud. Put a toy sleigh or a coin on one square and take turns writing codes to deliver to the houses in order. Then look for a shorter way to write the same code with a repeat loop.
Unplugged coding on a town grid, where arrow cards fly Santa's sleigh one square at a time around tall trees, storm clouds and radio towers, and a present card drops a present down the chimney of the house below. Students follow codes and circle the houses that get presents, write the shortest way to a house, deliver to houses in order, fix a wrong card, and use repeat loops and loops inside loops to make long codes short.
Tell us what to make next, or build your own with a worksheet maker.
This worksheet is free to download, print, copy, and hand out in your classroom or at home. You do not need to create an account, and there are no watermarks on the PDF.