Overview
Key Terms:
Code
Condition
criterion
false
true
program
pseudocode
flowchart
variable
Lesson Plan: Conditionals
If/Then and If/Then/Else Statements
TEKS 4A (4) Creativity and innovation--emerging technologies.
(A) evaluate how changes in technology throughout history have impacted various areas of study;
Learning Objective
I will learn how to create Conditional Statements
Success Criteria
I can create and If/Then Statement
I know explain conditionals
I can code and If/Then/Else Statement
What is the importance of storyboarding? Which do you prefer, paper or digital storyboards? Why?
Computer Science Concepts
Code
Condition - something which can be true or false, and is used to decide whether an action happens
Conditional statement - a statement with multiple possible outcomes which depend on a condition
criterion
pseudocode
flowchart
This video introduces students to one of the main concepts used across coding languages: conditionals. Students learn that a conditional statement tells a program to execute different actions depending on whether a condition is true or false. The song teaches students how to write conditional statements using the structure “if, else if, else.” It walks through an example of a conditional statement that could exist in the code for a video or computer game and shows how it would look in Python, a coding language.
Flocabulary Coding: Conditionals Lesson
https://studio.code.org/s/course2/lessons/13/levels/1 Code.org Conditioanla if/Then Else lesson
Lesson Plan: Boolean Expressions
.
TEKS 4A (4) Creativity and innovation--emerging technologies.
(A) evaluate how changes in technology throughout history have impacted various areas of study;
Learning Objective
I will be able to use boolean expressions within my code
Success Criteria
I can code true/false statements
What are Conditional Statements
How do you use if/then/else?
What are flowcharts?
Computer Science Concepts
Boolean Expressions - a statement which must be true or false. Booleans can be used as conditions in programming.
True/False Values
Conditionals Statements - a statement with multiple possible outcomes which depend on a condition criterion.
What is the shape of boolean Scratch blocks?
How are Boolean blocks used within conditional statements?
Lesson Plan: And & Or Operators
In this lesson, they explore the use of the AND ( && ) and OR ( || ) operators and how these can be used instead of nested if statements to test multiple conditions. Students learn about short-circuit evaluation and practice using truth tables to evaluate a Boolean expression involving logical operators.
TEKS 4A (4) Creativity and innovation--emerging technologies.
(A) evaluate how changes in technology throughout history have impacted various areas of study;
Learning Objective
I will can create code using And & Or logical operators
Success Criteria
I can program using And & Or operators.
I can explain And & Or statements.
Boolean Logic: A form of logic in which all values are either TRUE or FALSE.
AND: Both conditions must be true for the output to be true.
OR: At least one condition must be true for the output to be true.
Introduction to Boolean Logic (10 minutes)
Begin by explaining what Boolean logic is.
Explain how computers use true or false values to make decisions.
Provide real-world examples:
AND example: “If it is sunny AND warm, we will go to the park.” (Both must be true)
OR example: “If it is sunny OR warm, we will go to the park.” (Only one has to be true)
Guided Coding Activity: Conditional Statements (15 minutes)
Walk students through an example using block coding.
Create a simple project where a sprite (like a character or object) moves when both (AND) or either (OR) conditions are met.
Example: Move a Sprite
Task: Make a sprite move forward if the "right arrow" is pressed AND the space bar is pressed.
Task: Make a sprite jump if the "space bar" is pressed OR the "up arrow" is pressed.
Steps:
Open a blank Scratch project.
Show how to detect key presses using "if" blocks in Scratch.
Inside the "if" block, drag the AND block and add two conditions (e.g., right arrow pressed AND space bar pressed).
Test the program together.
Independent Coding Project (20 minutes)
Let students create their own simple project using both "AND" and "OR" logic.
Project Ideas:
A character can move left or right if either the left or right arrow key is pressed (OR).
A door opens only if two keys are collected (AND).
Encourage creativity and problem-solving. Students should explain how their project uses Boolean logic when finished.
Explain And operators?
Explain Or operators?
Describe the differences between And & Or Operators.
Optional: Create a simple quiz with true/false scenarios using AND & OR to test their understanding.
Ask questions to prompt critical thinking:
"What happens if only one condition in an AND expression is true?"
"How is OR different from AND?"
"Can you think of any real-world examples where you use AND or OR logic?"