Programming 1A Lesson Plan
Lesson: Connect Code Blocks
Time: 75+ mins
In this lesson, students are introduced to Codey the troll and use simple commands in a sequence to help Codey collect candy!
Tynker Blocks Introduced
: Start program when the play button is selected. : Move the Actor one step forward. : Make the Actor jump over an obstacle, landing on the other side. : Repeat blocks inside this loop a specified number of times. Note this repeat loop is set to the value "3," so the code will repeat three times.
- Code: The language that tells a computer what to do
- Sequence: The order in which steps or events happen
- Command: A specific action or instruction that tells the computer to do something
- Loop: An action that repeats one or more commands over and over
- Counting loop: A loop that repeats one or more commands a specific number of times
- Identify and order steps to solve puzzles
- Recognize patterns to create sequencing tasks
- Solve puzzles using counting loops
- Computers (1 per student) with student account access to Tynker.com
Warm-Up (15 minutes)
Tell students that they are going to learn to about commands by playing a game of Simon Says:
- Tell your students to only follow instructions after the phrase "Simon says."
- Say, "Simon says step forward."
- Say, "Simon says jump!"
- Say, "Simon says jump 3 times!"
Explain that Tynker has a lot in common with Simon Says:
- Explain that a command is a specific action or instruction. Ask, "What are some commands I used during our game of Simon Says?"
- Explain that a counting loop is an action that repeats one or more commands a specific number of times. Ask, "Can you think of any loops we used during our game of Simon Says? If we were playing Simon Says and I wanted the class to jump 5 times, what should I say?" Discuss.
Getting Started (5 minutes)
Students might have trouble using Tynker's puzzle interface for the first time. Use your projector to show students how to...
- Open "Module 2: Pick Up the Candy."
- Drag and drop the "walk" block in the top left of the screen. Tell students to left-click and hold down the mouse button, and let go to drop the block.
- Drop the "walk" block in the dark panel on the far left to make it disappear.
- Drop the "walk" block in the central panel. Adjust its position by dragging and dropping it again within the center panel.
- Move the "on start" block within the center panel.
- Attach the "walk" block to the bottom of "on start." If you put the "walk" block above or to the side of the "on start" block, they will not attach.
Explain to your students that this puzzle is just like a game of Simon Says. They are Simon, and Codey is doing what they say.
- Say, "Clicking the Play button with just an 'on start' block is like saying 'Simon Says' with no instructions [command]. Codey will not know what to do!" Demonstrate by clicking the "on start" block without any "walk" blocks attached. Codey will not move.
As a class, solve "Module 2: Pick Up the Candy."
- Explain that this puzzle is just like saying "Simon says take two steps forward."
- Say, "Codey has to 'walk' forward two times to reach the candy."
Activities (30 minutes)
1. Puzzle Introduction (Introduction)
- This short clip introduces the goal of the puzzles: Help Codey the troll collect candy and get back into the computer.
2. Pick Up the Candy (Puzzle)
- Students will use two "walk" blocks to get Codey to the candy.
3. Get the Gum Drop (Puzzle)
- Students will practice using the "walk" block to solve a slightly more challenging puzzle. Remind students to look at how many spaces are in front of Codey, then have him "walk" that many times.
4. Avoid the Thimbles (Puzzle)
- This puzzle introduces the "jump" block, which makes Codey jump over an obstacle and land on the other side.
- Students will have to use the correct sequence of "jump" and "walk" to solve the puzzle. Encourage them to say or write down the steps before using any code blocks.
5. Repetition with Loops (Puzzle)
- This puzzle introduces the "repeat" block, which tells Codey to do the same thing a specific number of times.
- Students can solve this puzzle by placing 9 "walk" blocks in place of the repeat block, but encourage them to use the "repeat" block.
6. Repetition with Pattern (Puzzle)
- Students can solve this puzzle by placing the "walk" and "jump" blocks three times, but encourage them to use the "repeat" block. Tell them to write down the steps, work together, and identify the pattern before using any code blocks.
- Give a hint: Tell students that two code blocks go inside the "repeat" block.
Optional Activities (20 minutes each)
- Have students take out a piece of paper and a pencil.
- Ask your students to draw three squares on one side of the paper.
- Tell them to flip the paper over to the other side (without squares).
- Say, "Draw a square." Once students draw a square, repeat the request. Repeat once more.
- Ask, "What should I say if I wanted you to draw five squares? What's another way to ask you to draw five squares?" Discuss.
- Remind students that a loop is an action that repeats something over and over.
- As a class, discuss activities that require you to repeat or loop actions.
- What does it mean for something to "repeat"? What is another name for it? (loop)
- What did your students learn about loops?
- What was the most challenging puzzle for your students? Why?
- CCSS-ELA: RI.1.1, RI.1.6, RI.1.10, RF.1.4, RF.1.4.A, RF.1.1, SL.1.1, SL.1.2, SL.1.3, RI.2.1, RF.2.4, RF.2.4.A, RI.2.6, SL.2.1, SL.2.2, SL.2.3
- CCSS-Math: MP.1, 1.OA.B.3, 2.OA.B.2
- CSTA: 1A-AP-09, 1A-AP-10, 1A-AP-11, 1A-AP-14
- CS CA: K-2.AP.10, K-2.AP.12, K-2.AP.13, K-2.AP.16
- ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 7.c
Key stage 1
Pupils should be taught to:
- understand what algorithms are, how they are implemented as programs on digital devices, and that programs execute by following precise and unambiguous instructions
- create and debug simple programs
- use logical reasoning to predict the behaviour of simple programs
- use technology purposefully to create, organise, store, manipulate and retrieve digital content
- use technology safely and respectfully, keeping personal information private; identify where to go for help and support when they have concerns about content or contact on the internet or other online technologies
Key stage 2
Pupils should be taught to:
- design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
- use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
- understand computer networks, including the internet; how they can provide multiple services, such as the World Wide Web, and the opportunities they offer for communication and collaboration
- use technology safely, respectfully and responsibly; recognise acceptable/unacceptable behaviour; identify a range of ways to report concerns about content and contact