
Lesson 12: Combining Variables and Conditions
Presentation
•
Computers
•
6th - 8th Grade
•
Practice Problem
•
Medium
Tory Williams
Used 355+ times
FREE Resource
10 Slides • 6 Questions
1
Open Ended
What happens to a character in a video game if he/she takes too much damage? What else happens in the background?
2
Wednesday, May 10th
Houston Field Trip Details
30 students 3 chaperones
5:00 am Depart School (Breakfast at School)
10:00 am-2:00 pm NASA Space Center (Lunch, Tram Tour, Mission Mars, Starship Gallery)
5:45 pm-6:30 pm Dinner at Golden Corral -Lafayette, Louisiana
8:15 pm Arrive at Baker Middle School
3
Combining Variables and Conditionals
Next Field Trip:
April 21, 2023
SU 3-D Printing Field Trip
Maximum attendance: 60 students
May 9, 2023
LIGO Lab
Maximum attendance: 30 students
In today's lesson:
You will be remixing your Variable projects from Lesson 11.
4
Objectives
Students will be able to...
use conditionals using AND/OR
explain the concept of conditionals.
apply knowledge of conditionals.
enhance a variable program with conditionals.
utilize conditionals and loops appropriately to build an algorithm.
use descriptively named variables to store data.
manipulate data stored in constants and variables.
Essential Question
How can we use conditions and variables to direct the flow of our programs?
5
6
Conditionals and Variables
7
Open Ended
What happened in this program? (What has to happen for things to kick off?)
8
What is a "conditional"?
A piece of code that needs to check if something is true or false before it runs.
9
10
11
12
Multiple Choice
In Basketball, what are good variables?
Score
If the team wins
If the team loses
Whether the team listens to the coach
13
Multiple Choice
A variable is used to...
tell if an expression is true or false
repeat the same instructions over and over again
store information to be referenced and used by programs
store information so that it is never used in the program
14
Multiple Choice
Statements that can only run under certain conditions or situations such as: if the seat is taken, then move to the next available seat.
conditionals (if/then statements)
variable
abstractions
binary
15
Multiple Choice
The information that’s stored inside a variable, such as a number or a name, is called what?
Variable
Value
Object
Conditional
16
Today's Assignment
Today and tomorrow, you will be working on improving your food game. Go to your completed game project (click the my stuff folder in your Scratch account) and save a new copy of it in Scratch so that you don't lose that particular project. You will need to upgrade it by including the following:
add more food sprites (eg. traditional/native foods) by importing images (crawfish, gumbo, etc.....)
play a sound when a food item is clicked (eg. cheer when healthy, boo when unhealthy)
turn the project into a game where the foods move around randomly on the screen and/or disappear when clicked
add a new variable named life points
If the number of nutrition points drops below -4, subtract a fixed number of life points. If the number of points is greater than 9, then add a fixed number of life points
A message about being nutritious if the number of points becomes greater than 9
A message about eating healthier food if the number of points becomes less than -4
What happens to a character in a video game if he/she takes too much damage? What else happens in the background?
Show answer
Auto Play
Slide 1 / 16
OPEN ENDED
Similar Resources on Wayground
12 questions
Editing and Revising
Presentation
•
6th - 8th Grade
12 questions
WORD PROCESSING
Presentation
•
7th - 8th Grade
11 questions
QBASIC
Presentation
•
6th - 8th Grade
11 questions
Using a Web Browser and Search Engines
Presentation
•
6th - 7th Grade
13 questions
Exploring Motion in Scratch
Presentation
•
6th - 8th Grade
11 questions
cartesian plane
Presentation
•
6th - 8th Grade
10 questions
Equation Vocabulary
Presentation
•
6th - 8th Grade
10 questions
Variables
Presentation
•
6th - 8th Grade
Popular Resources on Wayground
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
10 questions
Cinco de Mayo Trivia Questions
Interactive video
•
3rd - 5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
13 questions
Cinco de mayo
Interactive video
•
6th - 8th Grade
20 questions
Math Review
Quiz
•
3rd Grade
30 questions
GVMS House Trivia 2026
Quiz
•
6th - 8th Grade