Friday, December 16, 2016

Acting Out The Loop

One of my major goals this year has been to get more activity in class to help students understand concepts. Jumping right into code is awfully abstract for many students. So I have been adding activities to help students see the connection between concepts in programming and in real life. Looping is where I have been having some fun. Probably most of what I am doing is old news to experienced teachers. Maybe sharing some of them will spark people sharing other ideas I can steal adapt for my own use.

I’ve been having students walk for a while. Take 7 steps for example for a counting loop. Walk from place a to place b for a while loop. And the ever popular “walk that way” (choose a wise guy for this one so they keep pretending to walk when they get to the wall) for an infinite loop.

Lately I added some activities with a deck of cards. Count out 10 cards or count this batch of cards (always use a subset or include jokers so someone will be wrong if they shout out “52”) as a loop activity. Pull cards off of the deck until you get to a face card or some other specific card to demonstrate a while loop. It seems to go over well.

For the difference between a counter variable and an accumulator I have been using a small handful of coins. “What is the total value of the coins” and “how many coins are there” are very different activities. And I don’t know about your students but mine pay attention when money is involved even if they don’t get to keep it.

So far it seems like these examples help students grasp the concepts better and faster. It may help that students seem to pay more attention to what their peers are doing than what their teacher is doing.

Students don’t realize how much of what they do every day is really some form of looping. Walking for example or climbing stairs.  Or even writing essays (keep writing until you hit 500 words.) I hope that by making the reality of it all more solid it will help as we take on the coding involved. So far its going well. And it makes the class more interesting for me to teach as well. Win win! Smile

No comments: