
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
6 questions
équation de second degré
Presentation
•
10th Grade
8 questions
Soal Array - Informatika
Presentation
•
11th Grade
6 questions
Gamification's test
Presentation
•
10th Grade
7 questions
ICT 10 3RD QUARTER REVIEW
Presentation
•
10th Grade
9 questions
Komputer Dasar
Presentation
•
10th Grade
10 questions
FERPA Cybersecurity
Presentation
•
10th Grade
6 questions
Settlement Patterns 1
Presentation
•
10th Grade
6 questions
Test wiedzy o alpakach
Presentation
•
KG
Popular Resources on Wayground
6 questions
Secondary Safety Quiz
Presentation
•
9th - 12th Grade
10 questions
MyPath Diagnostic Overview
Presentation
•
6th - 8th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Adding and Subtracting Decimals
Quiz
•
5th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
21 questions
Lab Safety
Quiz
•
10th Grade
Discover more resources for Computers
20 questions
Early Computing
Quiz
•
7th - 12th Grade
20 questions
Module 1 Topic 1 Vocabulary
Quiz
•
9th - 12th Grade
10 questions
Exploring Computer Hardware and Software Components
Interactive video
•
6th - 10th Grade
39 questions
Safety Review
Quiz
•
9th - 12th Grade
20 questions
Digital Citizenship
Quiz
•
8th - 12th Grade
22 questions
Electronic Computing
Quiz
•
8th - 12th Grade