
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
11 questions
Writing an Introduction
Presentation
•
6th - 8th Grade
11 questions
Independent and Subordinate Clauses
Presentation
•
6th - 8th Grade
11 questions
Практикум по операторам ветвления
Presentation
•
6th - 8th Grade
10 questions
Homeostasis
Presentation
•
6th - 8th Grade
9 questions
Web output
Presentation
•
6th - 8th Grade
10 questions
HTML Editors
Presentation
•
7th Grade
11 questions
Paired Text
Presentation
•
6th - 8th Grade
11 questions
Teenager 5 Session 24: Pronunciation & Speaking
Presentation
•
KG
Popular Resources on Wayground
5 questions
A Home on the Shore
Quiz
•
3rd Grade
28 questions
US History Regents Review
Quiz
•
11th Grade
6 questions
A Horse Tale
Quiz
•
3rd Grade
20 questions
Math Review
Quiz
•
3rd Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
20 questions
Dividing Fractions
Quiz
•
5th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
10 questions
Equation Word Problems
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
10 questions
Equation Word Problems
Quiz
•
7th Grade
15 questions
Soccer World Cup Quiz Questions
Quiz
•
7th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
10 questions
Juneteenth: History and Significance
Interactive video
•
7th - 12th Grade
30 questions
Circles, Area, & Volume II 2026
Quiz
•
8th Grade
10 questions
Static and Dynamic Characters
Quiz
•
6th Grade