
8.1 Programming concepts Lesson Slides
Presentation
•
Computers
•
9th - 12th Grade
•
Medium
Adrian Ortiga
Used 6+ times
FREE Resource
23 Slides • 16 Questions
1
8.1 Programming concepts
Variables and Constants
By Adrian Ortiga
2
A programs needs to store data
For example:
The Grades of the students
The coins you have in Super Mario
Your username of Wechat account
3
Variables and Constant are use to store this data
666
X
4
Computer Memory, eg. RAM
Data
values
Memory
location
(address)
5
Each variable and constant is on a different memory location
we have number 10
In memory
location 0
6
Each Var and Const have an identifier (a name to find the value)
Here the identifiers are the memory location
7
Each Var and Const have an identifier (a name to find the value)
But we change it, to more meaningful names
8
Fill in the Blanks
9
Fill in the Blanks
10
Fill in the Blanks
11
Multiple Choice
What is the difference between a constant and a variable?
12
Fill in the Blanks
13
Create, declare, define a variable
14
Create, declare, define a variable
Page 200
15
Common Variable Naming Conventions
(Rules for the names of variables.)
16
Multiple Choice
Which one of these is a valid variable name?
user-name
123name
user_name
name@user
17
Common Variable Naming Conventions
(Rules for the names of variables.)
18
Multiple Choice
Which variable name is NOT allowed?
firstPlace
_winner
2ndWinner
winner2
19
Common Variable Naming Conventions
(Rules for the names of variables.)
20
Multiple Choice
Which variable name is correct?
user name
username
user-name
user@name
21
Common Variable Naming Conventions
(Rules for the names of variables.)
22
Multiple Choice
Which is the best variable name for storing a person's age?
age
number1
a
temp
23
Common Variable Naming Conventions
(Rules for the names of variables.)
24
Multiple Choice
Which is an example of camelCase?
total_price
TotalPrice
totalPrice
totalprice
25
Common Variable Naming Conventions
(Rules for the names of variables.)
26
Multiple Choice
Which variable name is written like a constant?
max_speed
MaxSpeed
MAX_SPEED
maxSpeed
27
Common Variable Naming Conventions
(Rules for the names of variables.)
28
Multiple Choice
Which variable name is NOT a reserved keyword?
if
while
data
for
29
Common Variable Naming Conventions
(Rules for the names of variables.)
30
Multiple Choice
In most languages, what is true about Name and name?
They are the same.
They are different.
One is correct, one is wrong.
They are both wrong.
31
Common Variable Naming Conventions
(Rules for the names of variables.)
32
Multiple Choice
When is it okay to use very short variable names like i or j ?
In any program.
When naming user accounts.
Never.
Inside a small loop.
33
Common Variable Naming Conventions
(Rules for the names of variables.)
34
Multiple Choice
Why should you use the same style (like camelCase or snake_case) in your code?
To make it look cool.
To avoid errors.
To make the code easy to read.
Because the computer requires it.
35
Constants
Constants are the variables that CANNOT be changed.
36
Constants
Some programming languages like Python do not support CONSTANTS.
37
Data types
The data store in Variables and Constants can be of different types.
38
Data types
Page 202
39
Match
Match the following data with its data type
String
Integer
Real, single, double
Bolean
Char
"hello"
666
666.00
False
'h'
"hello"
666
666.00
False
'h'
8.1 Programming concepts
Variables and Constants
By Adrian Ortiga
Show answer
Auto Play
Slide 1 / 39
SLIDE
Similar Resources on Wayground
34 questions
More Quadrilaterals - Trapezoids and Kites
Presentation
•
8th - 12th Grade
31 questions
TB Storyboard Drawing and Color
Presentation
•
9th - 12th Grade
33 questions
Prohibition and Gangsters
Presentation
•
9th - 12th Grade
37 questions
ENT TESTCENTER
Presentation
•
9th - 12th Grade
35 questions
Force Analysis of Simple Harmonic Motion
Presentation
•
9th - 12th Grade
30 questions
Properties of Quadrilaterals
Presentation
•
9th - 12th Grade
30 questions
4.2 Checking Accounts Lesson
Presentation
•
9th - 12th Grade
36 questions
2nd 6wks
Presentation
•
9th - 12th 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