Cover Page

Code Jumper Curriculum: Lessons, Lesson 19 Boolean Logic

American Printing House for the Blind

Code Jumper Curriculum: Lessons

Copyright © 2020 American Printing House for the Blind

All rights reserved. No part of this publication may be reproduced, stored in retrieval system, or transmitted in any form or by any means, except as expressly permitted under copyright law, without written permission of the publisher.

Published by American Printing House for the Blind

1839 Frankfort Avenue, Louisville, KY 40206

www.aph.org | [email protected]

Overview

Lesson Objectives

In this lesson, students will be introduced to Boolean values and logic. Boolean is a system that is used to create True/False statements. There are multiple Boolean operators. These lessons will focus on AND, OR, and NOT.

Expected Outcomes

Students will:

  • All students: Be able to use the Not Boolean value
  • Most students: Be able to use Boolean values and logic to determine the correct value
  • Some students: Be able to explain what a Boolean value is and use it in a program

Lesson Plan Structure

  • Unplugged Activity
  • Guided Code Jumper Activity
  • Exploration
  • Standards and Check for Understanding

Key Vocabulary

  • Boolean Value: A type of data that has only two values—true or false
  • AND: A statement where both conditions must be true or both must be false
  • OR: A statement where either condition can make the entire statement true or false
  • NOT: A statement that reverses the expression from true to false or false to true

Guided Activity 1

Objective

In this activity students will be introduced to Boolean values and logic. Boolean is a system that is used to create True/False statements. There are multiple Boolean operators. These lessons will focus on AND, OR, and NOT.

Materials

  • Computer Science Journal
  • Code Jumper Kit
  • Guided Activity 1 Instruction Cards
  • Answer Key

Instruction

  1. Review the concept of Boolean values.
  2. Ask students to remove the Hub and eight Play pods from the Code Jumper kit.
  3. Have students get ready to record information in their Computer Science Journals.
  4. The first task is to look at AND. When speaking or writing we use the word “and,” to get more things or options. For example, I want the chocolate and the cookie. In Boolean, AND actually means you have fewer choices. For example, when you are picking out an ice cream flavor and you want it to have both chocolate and mint, your choices narrow down to fewer flavors because the ice cream has to have both characteristics.
  5. In language the word “or” gives us fewer choices. For example, you have the choice of the soup or the salad. You cannot have both so you have to pick one. In Boolean, OR does the opposite: It allows us to choose from more options. For example, if you want chocolate or mint in your ice cream flavor, there are many more choices, such as plain chocolate, chocolate peanut butter, mint, vanilla mint. You can choose an ice cream with one or both of the flavors instead of being required to have both.
  6. The last word we are going to look at is the word NOT. Based on what we talked about with ice cream, ask students to make a prediction about how NOT would be interpreted by a computer. (Expected response: Ice cream flavor, NOT nuts would eliminate any of the flavors that had nuts in them.)
  7. We can write statements that help us select the right value by using Boolean values.
  8. Distribute Example 1 to the students. (located at the end of the lesson)
  9. Go through the following examples together to demonstrate the AND, OR, and NOT statements.
    • Set up Code Jumper with one Play pod attached to the Hub.
    • Select the Sound set Nature.
    • Slowly go through each of the sounds in the Sound set to familiarize the students with the sounds.
    • Ask the students how many sounds there are in the Nature sound set (8).
    • Read aloud the first statement in Example 1.
    • Ask students to predict the outcome.

      Example 1:

      • We are looking for one more animal sound that is wet AND happens during a storm (Answer: Rainfall).
      • We are looking for one or more animal sound that are wet OR happens during a storm (Answers: Waves, rainfall, splash, thunder).
    • Just by changing the Boolean operator, we change what values are correct for the statement. Encourage students to find the output for Example 2 and discuss the results.

      Example 2:

      • We are looking for one or more animal that eats bugs AND flies (answer: birds, seagulls, crickets)
      • We are looking for one or more animal that eats bugs OR flies (answer: birds, seagulls, crickets, frogs)
    • Changing the Boolean operate to NOT will also change our outcome, by excluding options in our Sound set. Encourage students to find the output for Example 3 and discuss.

      Example 3:

      • We are looking for one or more sounds from the Nature Sound set that is wet NOT from the sky (waves, splash, NOT rainfall)
      • We are looking for one or more sounds from the Nature Sound set that chirps NOT croaks (crickets and birds NOT frogs)

Guided Activity 2

Objective

Students will learn how AND, OR, NOT are used in computer science

Materials

  • Boolean Value Exploration Instruction Card
  • Computer Science Journal
  • Boolean Value Guided Activity 2 Instruction Card Answer Key

Instruction

  1. Hand out the Boolean Value Guided Activity 2 Instruction Card and either complete the statements on the sheet or in their Computer Science Journals. You can use the blank Boolean Value Exploration Instruction Card at the end of the lesson.
  2. For each statement, students will add a Play pod and turn the Sound dial to determine the correct sound. If there is more than one possibility, the student can choose any of the sounds to be played on the pod.
  3. From the Animal sound set, determine which sounds complete each statement. If no animal matches the statement, use a Pause pod to indicate that no animals match.

Boolean Value Guided Activity Instruction Card Answer Key

Question Statement Number of Answers Animals
1 Find the sound/s of animals that have feathers OR fur 7 Rooster, Duck, Horse, Dog, Cat, Sheep, Lion
2 Find the sound/s of animals that have four legs 5 Horse, Dog, Cat, Sheep, Lion
3 Find the sounds/s of animals that have four legs OR two legs 8 All sounds
4 Find the sound/s of animals that have two legs AND swim 1 Duck
5 Find the sounds/s of animals that have four legs AND two legs 0 Use Pause pod to represent
6 Find the sounds/s of animals that have four legs NOT manes 4 Dog, Cat, Sheep, Pig
7 Find the sounds/s of animals that have feathers NOT fur 2 Duck, Rooster
8 Find the sounds/s of animals that have four legs AND fur NOT hooves 3 Lion, Cat, Dog
9 Find the sounds/s of animals that are Carnivores OR Herbivores NOT Omnivores 2 Horse, Sheep

Exploration:

Overview

Students will create statements using the Boolean operators AND, OR, and NOT.

Materials

  • Code Jumper Kit
  • Computer Science Journal
  • Boolean Value Exploration Instruction Card Template

Instruction

  1. Students should base their statements on one Sound set in Code Jumper.
  2. In their Computer Science Journals, students will create at least five statements, and then use their Boolean operators to build a program in Code Jumper.
  3. Have students pair up and together write at least five statements using the Boolean operators, including the answers they wrote in their Computer Science Journals.
  4. Once all the groups have finished, assign students to new pairs and have them swap the statements and create the program in Code Jumper.
  5. When the students have all five sound sets, have them play the program for the original writers of the program to see if it is correct.
  6. The original writers should trace the code and indicate which sounds are correct and incorrect. Remember, there can be more than one right answer for a statement. It is important for the original writers to record all possible outcomes of the statement.
  7. Students can then reflect on what went well and what did not go well in the activity.

Standards and Check for Understanding

CSTA K-12 Computer Science Standards*

  • CL.L2-03 Collaborate with peers, experts, and others using collaborative practices such as pair programming, working in project teams, and participating in group active learning activities
  • CT.L1:6-01 Understand and use the basic steps in algorithmic problem-solving
  • CT.L1:6-02 Develop a simple understanding of an algorithm using computer-free exercises
  • CPP.L1:6-05 Construct a program as a set of step-by-step instructions to be acted out

National Curriculum of England**

Key Stage 1:

  • 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 behavior of simple programs
  • Use technology purposefully to create, organize, store, manipulate and retrieve digital content
  • Recognize common uses of information technology beyond school
  • 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:

  • Design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
  • Use sequence, selection, and repetition in programs; work with variables and various forms of input and output
  • Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
  • Use search technologies effectively, appreciate how results are selected and ranked, and be discerning in evaluating digital content
  • Use technology safely, respectfully and responsibly; recognize acceptable/unacceptable behavior; identify a range of ways to report concerns about content and contact.

Closing Activities and Check for Understanding

Have students record in their Computer Science Journals where they see Boolean logic in their everyday lives.

Check for understanding Completed
Students can write a statement using the Boolean Operators AND, OR, and NOT Yes / No
Students can determine what values are true for a Boolean statement. Yes / No

Instruction Cards

Guided Activity 1 Example 1

We are looking for one more animal sound that is wet AND happens during a storm.

We are looking for one or more animal sound that are wet OR happens during a storm.

Guided Activity 1 Example 2

We are looking for one or more animal that eats bugs AND flies.

We are looking for one or more animal that eats bugs OR flies.

Guided Activity 1 Example 3

We are looking for one or more sounds from the Nature Sound set that is wet NOT from the sky.

We are looking for one or more sounds from the Nature Sound set that chirps NOT croaks.

Boolean Value Guided Activity 2 Instruction Card

Question Statement Number of Answers Animals
1 Find the sound/s of animals that have feathers OR fur
2 Find the sound/s of animals that have four legs
3 Find the sounds/s of animals that have four legs OR two legs
4 Find the sound/s of animals that have two legs AND swim
5 Find the sounds/s of animals that have four legs AND two legs
6 Find the sounds/s of animals that have four legs NOT manes
7 Find the sounds/s of animals that have feathers NOT fur
8 Find the sounds/s of animals that have four legs AND fur NOT hooves
9 Find the sounds/s of animals that are Carnivores OR Herbivores NOT Omnivores

Boolean Value Exploration Instruction Card Template

Question Statement Number of Answers Animals
1
2
3
4
5
6
7
8
9

Code Jumper

For more resources, visit codejumper.com

Copyright © 2020

American Printing House

1839 Frankfort Avenue

Louisville, Kentucky 40206

502-895-2405 • 800-223-1839

www.aph.org[email protected]