CS Unplugged: Events
Use this CS Unplugged activity to demonstrate how Events work.
Learning Objectives
In this activity, students will:
Learn that events are triggers to make an action happen
Begin to think abstractly about what computers are doing with the code we put into them.
Vocabulary
Program - a list of commands to solve a problem
Sequence - the order in which the code runs
Events - triggers that make action happen in coding, like turning a light on and off
Materials you will need
Print out instructions for 4 characters and cut out each instruction
4 envelopes
Write PURPLE on one envelope and put character 1’s instructions inside
Write ORANGE on another envelope and put character 2’s instructions inside
Write GREEN on another envelope and put character 3’s instructions inside
Put character 4’s instructions in final envelope
Group Discussion
Ask students to share what they already know about events from their everyday experiences.
Have students explain what they think “events” mean.
Ask students to think about how we can give instructions to computers.
Run Activity
You will need to pick 4 students for the demonstration. Using some sort of random process to pick students like popsicle sticks will help ensure you avoid implicit bias and/or pigeonholing. Have the 4 students stand up in a line in front of the class and give them the envelopes in order from character 1 to 4. Ask them to open their envelopes and read the instructions silently. Confirm they understand their instructions. Position character 4 so she/he can see the names of the colors on the envelopes.
Before you start the activity, ask the rest of the students to watch silently and see if they can figure out the code in the envelopes. Then start tapping character 1, 2 and 3s head, in any order allowing time for each student to “run” their code.
After a few minutes, see if anyone in the class has figured out the code being “mailed” to each to characters 1-3. Keep going until the class figures out all the code being “sent”.
Follow-up Discussion
What was the trigger for each event? (answer: tapping their heads)
How come they didn’t need to use any spoken words to communicate?
What are some examples of “events” that trigger action in the real world? (for example, school bells, traffic lights, seat belt sign on airplane)
What are some ways you can think of using events: (for example, timing a conversation, starting a scene, making a character do an action like move, talk, disappear, creating multiple scenes/levels, etc.)