Mazes, Algorithms, and Programs

This lesson provides an introduction to blocks-based programming and basic algorithm and programming terminology. Students are instructed to complete a sample Blockly activity in which they create small programs (scripts), using blocks, to solve mazes. The students are directed to the Angry Birds maze activity. After the instructor demonstrates the program, students may work alone or in pairs. Note: This is the first lesson using the lesson plan format for Mobile CSP. Most of Unit 1 are set up activities and background information for teachers. This lesson plan format will be used more extensively in Units 2-7.

CSP Framework Lesson Activities
BI 4: Algorithms
, EU 4.1 - Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.
Develop an algorithm for implementation in a program. [LO 4.1.1]
EK 4.1.1A P2
Students develop an algorithm to solve a maze.
Express an algorithm in a language. [LO 4.1.2]
EK 4.1.2A P5
Students express their algorithm using the Blockly language.
BI 4: Algorithms
, EU 4.2 - Algorithms can solve many, but not all, computational problems.
Evaluate algorithms analytically and empirically for efficiency, correctness, and clarity. [LO 4.2.4]
EK 4.2.4C P4
Students evaluate their Blockly algorithms for correctness in order to solve a maze.
BI 5: Programming
, EU 5.1 - Programs can be developed for creative expression, to satisfy personal curiosity, to create new knowledge, or to solve problems (to help people, organizations, or society).
Develop a correct program. [LO 5.1.2]
EK 5.1.2A P2
Students implement a correct Blockly program that solves a maze.
Collaborate to develop a program. [LO 5.1.3]
EK 5.1.3A P6
Students work in pairs or as a class to develop a correct Blockly program that solves a maze.
BI 5: Programming
, EU 5.2 - People write programs to execute algorithms.
Explain how programs implement algorithms.[LO 5.2.1]
EK 5.2.1A EK 5.2.1B P3
Students will explain how the Blockly program is used to solve a maze.

Professional Development

The Student Lesson: Complete the activities for Unit 1 Lesson 1.2: Mazes, Algorithms, and Programs.

Materials

Laptops/Computers, Presentation system (LCD projector/Interactive whiteboard)

Learning Activities

Estimated Length: 45 minutes

  • Hook/Motivation (5 minutes): Think-Pair-Share: Ask students how they would define the word algorithm to get them more familiar with the term, which is one of the 7 Big Ideas in the course.
  • Experiences and Explorations (25 minutes): Lead the students through one of the Blockly mazes. Start them off by completing at least two levels with the class as a whole. After doing some examples, split the students into pairs and let them try completing the remaining levels. The class challenge can be to complete all the levels.
  • Rethink, Reflect and/or Revise (15 minutes): Blockly is a blocks-based programming language. It differs from text-based languages that students may have heard of, such as Java and Python. Visual, blocks-based languages make programming more accessible to beginners. Programming with blocks helps avoid making frustrating typographical errors. You can put blocks together to solve problems, such as mazes and puzzles. Review the types of control structures that make up algorithms: Sequence, Selection, and Repetition. Ask students to identify which mazes use those control structures and what blocks correspond to them.

    After the discussion, if there is time, ask students to consider the Food for Thought section on whether or not there are algorithms or problems that can't be solved. (Yes, there are and we will discuss them later in the course.)

Assessment Opportunities

  • Class Discussion: Students should be able to define the term algorithm and be able to identify the use of sequence, selection, and repetition in blocks-based code.
  • Maze Levels Completion: Students will be able to create algorithms to solve a maze. If completing a maze that has 10 or more levels, you may ask the students to print their solution to their last solved puzzle. If using Code.org's website, you can ask the student to print their certificate right from the site.

Differentiation: More Practice

If students are struggling with the mazes, it might help to print them and have them trace the solution on paper before trying to code it.

Differentiation: Enrichment

Have students create their own mazes on paper based on the ones they saw in the activities. They can write their solutions on a separate piece of paper and trade mazes to see if they can solve each others.

Background Knowledge: Computer Science Vocabulary

The purpose of this activity is to show an example of what programming is like and to introduce some basic terminology. Vocabulary knowledge, for both the instructor and the student, helps increase comprehension, fluency, and achievement. Listed below are some of the terms and their definitions that arise during this lesson and throughout the course.

algorithm
sequence of precise instructions that solves some problem or performs some computation
program
an algorithm that is written in a programming language that runs on a computer
control structures
a block of programming that determines which part of the program is executed next. There are three types of structures: sequence, selection, and repetition.

Analogies might be helpful in understanding the vocabulary. For example, an algorithm might be like a blueprint - a plan for how to create a building. The program might be similar to the building materials (i.e. which language is used to implement the algorithm). You could think of control structures like the common elements used in building - doors, windows, plumbing, etc.

If it's been awhile since you've thought about teaching vocabulary, you might find this article helpful: 5 Simple Steps for Effective Vocabulary Instruction.

Professional Development Reflection

Discuss the following questions with other teachers in your professional development program.

  • How does this lesson help students toward the enduring understanding that programs are developed by people for solving problems and for executing algorithms? [EU 5.1, EU 5.2]
  • How do the lesson activities promote the CT (computational thinking) practices of creating and analyzing an app (a computational artifact)? [P2, P4]

0 points
I am confident I can teach this lesson to my students.

0 points
What questions do you still have about the lesson or the content presented?