# 1.2. 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.

### 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)

## 1.2.1. 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 main 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.)

### AP Classroom

The College Board's AP Classroom provides a question bank and Topic Questions. You may create a formative assessment quiz in AP Classroom, assign the quiz (a set of questions), and then review the results in class to identify and address any student misunderstandings.The following are suggested topic questions that you could assign once students have completed this lesson.

### 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.

## 1.2.2. 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?
• How do the lesson activities promote the CT (computational thinking) practices of creating and analyzing an app (a computational artifact)?

### Professional Development Exit Slip

I am confident I can teach this lesson to my students.
• 1. Strongly Agree
• 2. Agree
• 3. Neutral
• 4. Disagree
• 5. Strongly Disagree