Lesson 11: Introduction to Online Puzzles

Overview

In this lesson, students will be introduced to sequences, loops, and nested loops to prepare them for more complicated concepts in the later part of the course. This "ramp up" lesson equalizes the playing field between the experts and the beginners in your class.

Purpose

Code.org works hard to make sure everyone has the chance to learn computer science. These "introduction" lessons create a level playing field for all students in your class. From beginners to experts, everyone will be taught the basics of programming on Code.org as well as some foundational concepts that the students will later build on.

Agenda

Warm Up (5 min)

Bridging Activity (15 min)

Main Activity (30 min)

Wrap Up (15 min)

View on Code Studio

Objectives

Students will be able to:

  • Categorize and generalize code into useful functions.
  • Break down a long sequence of instructions into the largest repeatable sequence.

Preparation

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.
  • Loop - The action of doing something over and over again.
  • Repeat - To do something again.

Support

Report a Bug

Teaching Guide

Warm Up (5 min)

Introduction

Ask the class what they learned from the last activity, "Algorithms Unplugged: Tangrams" and how they think it relates to computers.

Explain that computers use algorithms to solve basic and very complex problems. Today, they will be creating algorithms to solve puzzles online!

If your class is interested, you can continue to discuss the last lesson. Otherwise, move on to the bridging activity.

Bridging Activity (15 min)

This activity will help bring the unplugged concepts from "Algorithms Unplugged: Tangrams" into the online world that the students are moving into. Do the following with your class:

Previewing Online Puzzles as a Class

Display a puzzle from the Course F Online Puzzles - 2018 - Website associated with this lesson. We recommend the fifth puzzle. Ask the class to come up with the commands needed to get the Scrat to the acorn. Many students will likely avoid using the loop, so make sure you point out that there are only so many move forward blocks available.

Complete the puzzle as a class and start a discussion on the different ways it could have been solved.

  • Were there other paths that Scrat could take?
    • Why did we choose not to follow those paths?
  • Why did we use a loop? Should we always use loops?

Allow the class to continue the discussion if they are interested with a partner as they walk to the computers. Have them work with the same partner through the online puzzles.

Main Activity (30 min)

Course F Online Puzzles - 2018 - Website

Teacher Tip

Show the students the right way to help classmates:

  • Don’t sit in the classmate’s chair
  • Don’t use the classmate’s keyboard
  • Don’t touch the classmate’s mouse
  • Make sure the classmate can describe the solution to you out loud before you walk away

Teachers play a vital role in computer science education and supporting a collaborative and vibrant classroom environment. During online activities, the role of the teacher is primarily one of encouragement and support. Online lessons are meant to be student-centered, so teachers should avoid stepping in when students get stuck. Some ideas on how to do this are:

  • Utilize pair programming whenever possible during the activity.
  • Encourage students with questions/challenges to start by asking their partner.
  • Unanswered questions can be escalated to a nearby group, who might already know the solution.
  • Remind students to use the debugging process before you approach.
  • Have students describe the problem that they’re seeing. What is it supposed to do? What does it do? What does that tell you?
  • Remind frustrated students that frustration is a step on the path to learning, and that persistence will pay off.
  • If a student is still stuck after all of this, ask leading questions to get the student to spot an error on their own.

Wrap Up (15 min)

Journaling

Having students write about what they learned, why it’s useful, and how they feel about it can help solidify any knowledge they obtained today and build a review sheet for them to look to in the future.

Journal Prompts:

  • What was today’s lesson about?
  • How did you feel during today’s lesson?
  • What is a loop and when do you use them?
  • Can you give an example of nested loops?

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards (2017)

AP - Algorithms & Programming
  • 1B-AP-11 - Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.

Cross-curricular Opportunities

This list represents opportunities in this lesson to support standards in other content areas.

Common Core English Language Arts Standards

L - Language
  • 5.L.6 - Acquire and use accurately grade-appropriate general academic and domain-specific words and phrases, including those that signal contrast, addition, and other logical relationships (e.g., however, although, nevertheless, similarly, moreover, in addition).
SL - Speaking & Listening
  • 5.SL.1 - Engage effectively in a range of collaborative discussions (one-on-one, in groups, and teacher-led) with diverse partners on grade 5 topics and texts, building on others’ ideas and expressing their own clearly.
  • 5.SL.1.a - Come to discussions prepared, having read or studied required material; explicitly draw on that preparation and other information known about the topic to explore ideas under discussion.
  • 5.SL.4 - Report on a topic or text or present an opinion, sequencing ideas logically and using appropriate facts and relevant, descriptive details to support main ideas or themes; speak clearly at an understandable pace.
  • 5.SL.6 - Adapt speech to a variety of contexts and tasks, using formal English when appropriate to task and situation.

Common Core Math Standards

MP - Math Practices
  • MP.1 - Make sense of problems and persevere in solving them
  • MP.2 - Reason abstractly and quantitatively
  • MP.4 - Model with mathematics
  • MP.5 - Use appropriate tools strategically
  • MP.6 - Attend to precision
  • MP.7 - Look for and make use of structure
  • MP.8 - Look for and express regularity in repeated reasoning
NBT - Number And Operations In Base Ten
  • 5.NBT.5 - Fluently multiply multi-digit whole numbers using the standard algorithm.

Next Generation Science Standards

ETS - Engineering in the Sciences
ETS1 - Engineering Design
  • 3-5-ETS1-1 - Define a simple design problem reflecting a need or a want that includes specified criteria for success and constraints on materials, time, or cost.
  • 3-5-ETS1-2 - Generate and compare multiple possible solutions to a problem based on how well each is likely to meet the criteria and constraints of the problem.
  • 3-5-ETS1-3 - Plan and carry out fair tests in which variables are controlled and failure points are considered to identify aspects of a model or prototype that can be improved.