Lesson 6: Processing

Overview

Students complete two unplugged card sorting activities to explore the meaning of processing and its relationship to problem-solving. The first activity has few constraints and is used to introduce a high-level definition of processing. The next introduces more constraints that force students to develop an algorithm that will always successfully process the cards. Students iteratively develop, test, and share their algorithms with classmates. A wrap-up discussion has students reflect on the different types of problem-solving they used in these activities and the value of producing an algorithm to solve a problem.

Purpose

This lesson serves multiple roles. It is another opportunity for students to collaboratively problem-solve. The main activity is a challenging problem that emphasizes the importance of testing solutions on multiple inputs, breaking down large problems, and iterative improvement. In sharing their solutions students see that there are many equally valid solutions to the same problem. These are features students will see in many of the problems they will encounter through the course.

This lesson also introduces the concepts of processing and algorithms. The definitions of processing and algorithms presented in this lesson are intentionally high-level. Students should understand that processing is whatever a computer does to turn inputs to outputs, and that using a computer to process information requires developing an algorithm that reliably does so. The goal of this lesson is NOT for students to understand and compare different classic sorting algorithms, or even necessarily to formalize their own.

Agenda

Warm Up (10 min)

Activity (30 mins)

Wrap Up (10 min)

Assessment Opportunities

View on Code Studio

Objectives

Students will be able to:

  • Define processing as the work done (possibly by a computer) to turn an input into an output
  • Define an algorithm as the series of commands a computer uses to process information
  • Develop and iteratively improve an algorithm for processing information based on given constraints

Preparation

  • Prepare one deck of cards for every 8 students, removing face cards. Pairs will need roughly 8 cards each.
  • Alternately, print and cut out the number cards Number Cards. Pairs will need roughly 8 cards each.
  • Prepare one copy of Card Sorting - Activity Guide for each student

Links

Heads Up! Please make a copy of any documents you plan to share with students.

For the Teachers

For the Students

Vocabulary

  • Algorithm - A list of steps to finish a task.

Teaching Guide

Warm Up (10 min)

Sorting Cards

Teaching Tip

How Many Decks?: This lesson can be completed with one deck of cards for every 8 students. If you don't have access to decks of cards you may run the activity using the Number Cards instead. It is fine if groups have duplicate cards.

Exclude Face Cards: Many students have no experience using playing cards. There's no need to use face cards in this activity, and even knowing the suits is not important. Feel free to pull out the face cards and emphasize that all that matters are the numbers.

Before and After: This image shows what cards should look like before and after the sort.

Remarks

So far we've explored what inputs and outputs mean in the context of a computer. Today we're going to look more closely at processing by doing a couple of unplugged activities.

Group: Place students into pairs.

Distribute: Give each pair roughly 10 cards. Place the cards in a stack face down between pairs. Ask students not to touch the cards until you say so.

Announce the rules of the challenge:

  • No talking during the challenge
  • The goal is to get the cards in a line, face up, in number order
  • When you are done, a team member should say "Done!" and the teacher will give the team a time

Once the class understands the activity and is ready, begin the challenge. You might choose to project a stopwatch if you like for comparison. Once groups have finished give them another opportunity to improve their times.

Discussion Goal

Goal: Try to highlight the following points as you synthesize comments from the room.

  • The input is the unsorted deck. The output is the sorted deck. The processing is the actual sorting process that turns the input into the output.
  • Students may say any number of things here. It’s better to take a “no wrong answers” approach unless students offer ideas that truly contradict things they’ve already seen in the class.

Prompt: Ask students to silently journal about the following prompts:

  • What are the input, output, and processing in this activity?
  • How is your approach to solving this problem different from how a computer might have to approach it?

Discuss: Give students an opportunity to talk at their tables about the prompts. Once they are ready to share ask a couple of groups to share their responses to each question.

Remarks

There are many ways your solutions might be different from how a computer would solve this problem. In general, however, the biggest difference is that computers need to be programmed with a plan without knowing the exact cards that they are going to get. In the next activity we're going to look at how a computer might solve this same problem.

Activity (30 mins)

Teaching Tip

Model the Rules: You will likely need to model the rules of the activity. For unplugged activities like this one, misconceptions can easily arise. Leave time early in the activity for questions to avoid students spending time on the wrong problem.

Card Sorting Algorithms

Activity Guide - Sorting Cards

Teaching Tip

Speed is Less Important: In the warm up activity the timing can help with motivation. In this activity the focus is much more on more deliberate problem solving. So long as their solutions work, considerations of speed or efficiency aren't important for the goals of this lesson.

Start with Fewer Cards: Encourage the class to start with just three or four cards before trying to test their algorithms on eight or more.

Distribute: Give each student a copy of Card Sorting - Activity Guide to each student (or pair of students).

Review Instructions: Have students read the activity instructions, then review as a class.

Circulate: Walk around the room and listen to the types of ideas students are discussing. Encourage students to practice using the Tips section on the activity guide. Reinforce the idea that they should have a strategy that works for every arrangement of the cards, not just the ones that they have out currently. Ensure pairs are switching between Sorter and Pointer roles.

Teaching Tip

What's Success Look Like?: To achieve the learning objectives of this lesson, students don't necessarily need to develop an method that works for eight cards, or even one that always works. If students have an method that is working for fewer cards or only works sometimes, they still will have grappled with the different type of problem-solving required in this activity and will be able to participate in the debrief discussion.

Share and Test: After several minutes have groups share the approaches they are using. The aim here is to give students a chance to hear how others are approaching the problem. Ask students to actually walk through their methods with the other group. The activity guide provides some possible test-cases that students could consider.

Iterate: Based on what they observed from other groups, ask groups to update, revise, or improve their own method. They should be aiming to create algorithms that work for greater numbers of cards (ideally any number of cards) and that work regardless of the original organization of the cards.

Circulate: Have students return to the challenge, encouraging them to move to eight cards if they haven't already. Once teams have an method they think works, have them write or draw a description of it on the activity guide in the space provided.

Processing Uses Algorithms: Read this section together as a class, calling out the new vocabulary word algorithm.

Wrap Up (10 min)

Discussion Goal

Goal: The first discussion helps contextualize this lesson as another problem-solving activity and provides an opportunity to review the importance of each step. Focus discussion on the "Why" part of the question.

The second discussion should highlight that while figuring out an algorithm is usually more time-consuming, it means you could then give the instructions to a computer to do that task for you. For example, with an algorithm a computer could sort a million cards, or a million piles of cards, faster than humans and without getting bored. It is a different type of problem-solving that emphasizes eventually automating the solution.

Solving Problems with Computers

Prompt: Either as a discussion or silent journal ask students to consider the following prompt, also found on their activity guides.

  • What step of the problem-solving process did you think was most important in this activity? Why?
  • Why would someone create an algorithm to process information if they already know how they would do it by hand?

Discuss: Have students share their responses with a partner and then share as a whole class.

Remarks

Computers help us solve problems by processing inputs to make outputs. As we saw in the second activity today, that can often mean more work up front to develop very specific steps a computer could use to process the information. It can be tricky and require lots of our problem-solving skills to do this. The benefit, however, is that once you have the problem solved once you can make a computer solve that problem for you every time after that.

Assessment Opportunities

Define processing as the work done (possibly by a computer) to turn an input into an output

  • The journal prompt at the beginning of the lesson ask students to identify the input, output, storage, and processing in the activity. At the end of the lesson, students can return to this prompt to better define how processing relates to the input and output.

Develop and iteratively improve an algorithm for processing information based on given constraints

  • In the activity guide, check that students have followed the rules of the activity in creating their algorithms, and that they improved their algorithms for the second iteration of the sorting activity.

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards (2017)

AP - Algorithms & Programming
  • 2-AP-10 - Use flowcharts and/or pseudocode to address complex problems as algorithms.
  • 2-AP-17 - Systematically test and refine programs using a range of test cases.
CS - Computing Systems
  • 1B-CS-01 - Describe how internal and external parts of computing devices function to form a system.
  • 1B-CS-02 - Model how computer hardware and software work together as a system to accomplish tasks.