
Variable Naming
Presentation
•
Computers
•
10th Grade
•
Practice Problem
•
Medium
Ryan Winton
Used 1+ times
FREE Resource
4 Slides • 5 Questions
1
Naming Variables
By Ryan Winton
2
Variables must have meaningful names.
Names that relate to the information/data they are storing.
A variable that stores the amount someone is paid per hour could be called payPerHour or pay_per_hour.
Meaningful
Variable Names
3
Naming Methods
Camel Casing
This name is given to the naming method where each new word in a variable name is given a capital letter (except the first word!).
payPerHour numberOfSubjects hoursWorked
Like a camel, these variable names have humps!
4
Naming Methods
Snake Casing
This name is given to the naming method where each new word in a variable name is separated by an underscore.
pay_per_hour number_of_subjects hours_worked
These variable names are like 1 long connected line like a snake!
5
Multiple Choice
Pick the example of Camel Casing
testScore
test_score
6
Multiple Choice
Pick the example of Snake Casing.
cube_volume
cubeVolume
7
Multiple Choice
Which of the following is not a suitable variable name?
test_score
TestScore
testScore
8
Multiple Choice
Which of the following is not a suitable variable name?
test_score
testscore
testScore
9
Open Ended
Give an example of a suitable name for a variable that is storing the number of subjects a pupil has taken.
Naming Variables
By Ryan Winton
Show answer
Auto Play
Slide 1 / 9
SLIDE
Similar Resources on Wayground
7 questions
Test Exam
Presentation
•
11th Grade
8 questions
Deret Geometri Tak Hingga
Presentation
•
10th Grade
8 questions
The Feudal System
Presentation
•
KG
8 questions
Adverbs Good vs Well
Presentation
•
10th Grade
9 questions
Alchene
Presentation
•
10th Grade
9 questions
Losing Control Blast
Presentation
•
10th Grade
6 questions
Lesson on Solving Complex Equations
Presentation
•
9th - 10th Grade
8 questions
Chapter 1: Robot Year 6
Presentation
•
10th Grade
Popular Resources on Wayground
28 questions
US History Regents Review
Quiz
•
11th Grade
36 questions
Biology Regents Review
Quiz
•
9th - 10th Grade
20 questions
Math Review
Quiz
•
3rd Grade
38 questions
Regents Life Science General Review
Quiz
•
9th Grade
20 questions
Math Review
Quiz
•
6th Grade
21 questions
EOY Grade 6 Benchmark Assessment - Content Skills
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
36 questions
Biology Regents Review
Quiz
•
9th - 10th Grade
45 questions
Earth and Space Science Regents: Exam Cram
Presentation
•
7th - 12th Grade
36 questions
NYS Biology Regents Exam: Word on the Street
Quiz
•
10th Grade
50 questions
Global Regents Review 1
Quiz
•
10th Grade
50 questions
Earth Science Regents Review
Quiz
•
10th Grade
50 questions
US History Comprehensive Final Exam
Quiz
•
9th - 12th Grade
16 questions
TSI Math 2.0 Practice
Quiz
•
9th Grade - University
50 questions
Global Regents Review #2- Multiple Choice
Quiz
•
10th Grade