Lesson Summary

Pre-lesson Preparation

This is the second session on algorithms

Summary

During the second session, the students will use pseudocode to describe an algorithm.

Outcome

  • Students will write pseudocode using sequencing, selection, and iteration constructs.
  • Students will write pseudocode for algebra / geometry formulas.
  • Students will write pseudocode for determining if a year is a leap year.

Overview

  1. Getting Started (5 min)
  2. Guided Activities (40 min)
    1. PowerPoint
    2. Think-Pair-Share
    3. Solutions check
  3. Wrap Up (5 min)

Learning Objectives

CSP Objectives

Big Idea - Abstraction
  • EU 2.2 - Multiple levels of abstraction are used to write programs or create other computational artifacts.
    • LO 2.2.1 - Develop an abstraction when writing a program or creating other computational artifacts. [P2]
Big Idea - 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.
    • LO 4.1.1 - Develop an algorithm for implementation in a program. [P2]
    • LO 4.1.2 - Express an algorithm in a language. [P5]

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP7: Look for and make use of structure.

Common Core Math:

  • A-SSE.1-2: Interpret the structure of expressions
  • A-SSE.3-4: Write expressions in equivalent forms to solve problems
  • F-IF.1-3: Understand the concept of a function and use function notation
  • F-IF.4-6: Interpret functions that arise in applications in terms of the context

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience

NGSS Practices:

  • 2. Developing and using models
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)

Key Concepts

Students will write pseudocode using sequencing, selection, and iteration constructs.


Essential Questions

  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How are algorithms implemented and executed on computers and computational devices?

 

Teacher Resources

Student computer usage for this lesson is: optional

Files in the Lesson Resources folder:

AlgorithmsPseudocode2.pptx : PowerPoint Slides for mini-lectures

Student Handout and Key for Matching Pennies Game

Student Handout for Rock Paper Scissors

Psuedocode Summary and Examples of common Algorithms.docx

Lesson Plan

Getting Started (5 min)

  • Homework Review from Session 1 (students were assigned to write pseudocode for selected Algebra/Geometry calculations)
  • Journal: Describe the algorithm of another student. Is there enough detail to allow somebody to follow the steps?

Guided Activities (40 min)

PowerPoint

Walk through “Selection Statements”; “Iteration / Repetition” slides from the AlgorithmsPseudocode2 file in the Lesson Resources folder.

Things to stress with your students:

1.  Whenever you need to store information, it must go into a variable.  So think about what variables might be needed when you are creating your algorithm

2.  Selection and Iteration statements require conditionals.  Identify a conditional as something that returns a True or False answer.  If selects the next statement to occur by answering the conditional question as being true or false.  I have in the past pointed out the True and Then both start with T so TRUE always does the THEN, wherease Else and False both end with LSE, so when the answer if FALSE, you do the ELSE.

While continues to loop as long as the conditional answer is TRUE.  When the conditional answer is false, the  algorithm jumps to the statement after the End While.

Guided Activity

During powerpoint, guide students through the Game of Matching Pennies (a student working copy and a solution key is in the Master Teacher Resource folder for this lesson).  

Think-Pair-Share

Students work in pairs to create and share their pseudocode.  Use the Rock Paper Scissors hand out to have student pairs psuedocode Rock Paper Scissors.  If there is time, have groups switch algorithms and critique the algorithm of the other group.

Walk through pseudocode syntax summary handout called Psuedocode Summary and Examples of common Algorithms.docx in Lesson Resources folder.

Students work through challenges and check their results against sample solutions. 

Wrap Up (5 min)

Review slide: "Why we have leap years." 

Homework:

Assign students to create pseudocode for leap years.


Options for Differentiated Instruction

Pairing of students and crossing pairs to form groups of four should be used for the set of exercises that are part of this lesson.


Evidence of Learning

Formative Assessment

Think-Pair-Share


Summative Assessment

Students will write pseudocode for algebra / geometry formulas.  These will be entered into their class notes.

Students will write pseudocode for determining if a year is a leap year.  This will be entered into their journals.