Lesson Plan

# Conditionals with Cards

We don’t always know ahead of time what things will be like when we run our computer programs. Different users have different needs, and sometimes you will want to do something based off of one user's need that you don’t want to do with someone else. That
Kim L.
Classroom teacher
Math and Science Exploratory School
Brooklyn, United States
Objectives

Students will be able to

Students will be able to:

●  Determine whether a conditional is met based on criteria

●  Define circumstances when certain parts of programs should run and when

they shouldn't

●  Execute an algorithm with a conditional statement

●  Solve puzzles using a combination of looped sequences and conditionals

Subjects
Science

#### 1 Hook

Activity: Conversing

Hook: Every day we make decisions about our actions - today when I was deciding what to wear I looked at my phone to check the weather. IF it was cool I’d wear a jacket. Or ELSE I’d leave it at home.
We don’t always know ahead of time what things will be like when we run a computer program.

In programming, ​Conditionals​ are statements that only run under certain contitions.

#### 2 Direct Instruction

Activity: Other — Game

Group game:
Practice IF, ELSE and IF, ELSE IF, and ELSE conditionals with drawing a card.

IF I draw a 7, everyone clap. Or ELSE, everyone say “aww.”

What’s the ​condition​ for the IF? What’s the condition for the ELSE? Which condition was met, the IF or the ELSE?
If I draw a 7, everyone clap. Or ELSE IF I draw a card less than 7, everyone say “yay!” Or ELSE, everyone say “aww.”

#### 3 Guided Practice

Activity: Other — Game

In teams of four, students play a card game If (Card is red)

AFTER GAME:

Bring whole class together to score example rounds together, then return to play.
What is the most favorable card to get?
What is the highest possible score your team can get in any ONE round?

Student Instructions

Award YOUR team one point Else

Award OTHER team one point

[Teams play two rounds to ensure understanding] Games continue with more complex rules:
If (Card is red)

Award YOUR team one point Else

If (card is higher than 9)
Award OTHER team one point

Else
Award YOUR team same number of points on the card

[Circulate to check score from each round until students understand]

#### 4 Independent Practice

Students need to have code.org accounts

Student Instructions

Think about your favorite video game. Do you earn more points for some actions than others? The compuer is using ​conditionals​ to determine how many points to award you.
Show conditional block and demo puzzle

Complete Course D Lesson 10: Conditionals in Bee