pxt-calliope/docs/courses/csintro/booleans.md
2017-06-30 03:32:11 +02:00

1.3 KiB

Booleans

This lesson introduces the use of the boolean data type to control the flow of a program, keep track of state, and to include or exclude certain conditions.

Picture and quote of Shakespeare Shakespeare knew Booleans (quote from Hamlet)

Lesson Objectives

Students will...

  • Understand what booleans and boolean operators are, and why and when to use them in a program.
  • Learn how to create a boolean, set the boolean to an initial value, and change the value of the boolean within a micro:bit program.
  • Learn how to use the random true or false block.
  • Apply the above knowledge and skills to create a unique program that uses booleans and boolean operators as an integral part of the program.  

Lesson Plan Structure

  • Introduction: Booleans in daily life
  • Unplugged Activity: Two Heads are Better Than One
  • Micro:bit Activity: Double Coin Flipper
  • Project: Boolean
  • Assessment: Rubric
  • Standards: Listed

Lesson plan

  1. Overview: Booleans
  2. Unplugged: Two heads are better than one
  3. Activity: Double coin flipper
  4. Project: Boolean

Targeted CSTA standards