← VCE Software Development U3O1

Purposes of naming conventions

An agreed pattern for naming variables, functions and controls so code is readable, consistent across a team and easier to maintain and debug.

Understanding Purposes of naming conventions in VCE Software Development U3O1

What it does: Names like student_age and minimum_age explain the logic, so a developer fixing a bug can understand it quickly. Each name states what it holds, so the line can be read like a sentence without guessing. A naming convention is an agreed pattern for names. It does not change how fast the program runs. It makes the code easier for people to read. Meaningful names describe the data they hold. A name like x1 tells a reader nothing about its purpose. Naming conventions affect readability and maintenance, not the behaviour or output of the program. Meaningful names improve readability. Very short names save typing but make code harder to understand.

Common mistakes: The rest of the program uses snake_case, but this line switches to camelCase. Mixed styles make code harder to read and cause errors because later lines use player_age. It should be player_age = int(input()). tc is a vague abbreviation that does not tell the reader what the value is. A meaningful name such as total_cost makes the code readable and easier to maintain. It should be total_cost = price * quantity.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 10–47) and word search (Modules 10–71).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which statement best describes a naming convention?
An agreed pattern for naming solution elements such as variables, functions and controlsA rule that decides how fast a program runs
Matches
x = 25 y = 0.1 z = x * y
↓
The names x, y and z are meaningless, so readers cannot tell what they represent. Use names like price, discount_rate and discount_amount.
Applying
Meanings
Term
naming convention
Meaning
An agreed pattern for naming variables, functions and controls so code is readable, consistent across a team and easier to maintain and debug.
Practice
student_name = "Ava"
Testing
Gaps
print()
Check Answer
Spots
1player_name = input()
2playerAge = int(input())

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Starfish' badge — Five-Point Star, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which statement best describes a naming convention?
A. An agreed pattern for naming solution elements such as variables, functions and controls ✓
B. A rule that decides how fast a program runs
A naming convention is an agreed pattern for names. It does not change how fast the program runs. It makes the code easier for people to read.
2. Which name is more meaningful for a variable that stores a student's final mark?
A. finalMark ✓
B. x1
Meaningful names describe the data they hold. A name like x1 tells a reader nothing about its purpose.
3. Why do development teams agree on one naming convention?
A. So the computer can tell who wrote each line of code
B. So every member's code looks consistent and is easy for others to read ✓
Consistency across a team means any developer can read and understand any other developer's code quickly.
4. A developer returns to their program six months later. How does a naming convention help?
A. Clear, consistent names make the code easier to maintain and debug ✓
B. The program fixes its own errors when names follow a pattern
Good names help you understand what the code does, so finding and fixing errors is quicker. The program does not fix itself.
5. True or false: Following a naming convention changes what the program outputs.
A. True - the output changes to match the names
B. False - it only changes how readable the code is ✓
Naming conventions affect readability and maintenance, not the behaviour or output of the program.

Match the Pairs

total_marks = 0 → A meaningful name that tells the reader what the variable stores, which makes the code readable
txtStudentName / txtStudentEmail → Consistent names that follow one shared pattern, so everyone on a team can understand each other's code
Meaningful names make maintenance and debugging easier because a developer can quickly see what each element does → if student_age < minimum_age:
A naming convention improves readability because a name describes the data it holds → average_score = total_score / num_tests
x = 25 y = 0.1 z = x * y → The names x, y and z are meaningless, so readers cannot tell what they represent. Use names like price, discount_rate and discount_amount.
studentName = 'Ava' student_age = 16 StudentYear = 11 → The names mix camelCase, snake_case and PascalCase, so they are inconsistent. Pick one pattern, such as student_name, student_age and student_year.

Key Term

naming convention
An agreed pattern for naming variables, functions and controls so code is readable, consistent across a team and easier to maintain and debug.

Fill in the Blanks

1. studentName = "Ava" print(studentName)
Hint: Type the variable name defined on the line above, spelled exactly the same way.
2. price = 4.5 quantity = 3 totalPrice = price * quantity
Hint: Type the meaningful variable name that holds how many items are bought.
3. def calcArea(width, height): return width * height area = calcArea(4, 5)
Hint: Type the function name exactly as it was defined, following the same naming pattern.
4. scores = [80, 90] for score in scores: print(score)
Hint: Type a meaningful singular name for one item in the list, matching the name used in the loop body.
5. TAX = 0.1 price = 50 total = price + price * TAX
Hint: Type the constant name defined on the first line, keeping its upper-case naming convention.

Spot the Error

Question 1
A player_name = input()
B playerAge = int(input())
C print(player_name, player_age)
Line B — The rest of the program uses snake_case, but this line switches to camelCase. Mixed styles make code harder to read and cause errors because later lines use player_age. It should be player_age = int(input()).
Question 2
A price = 20.0
B quantity = 3
C item_name = 'Pen'
D tc = price * quantity
E print(item_name, total_cost)
Line D — tc is a vague abbreviation that does not tell the reader what the value is. A meaningful name such as total_cost makes the code readable and easier to maintain. It should be total_cost = price * quantity.
Question 3
A scores = [70, 85, 90]
B total = 0
C for score in scores:
D total = total + Score
Line D — Names are case sensitive, and the loop variable was named score in lowercase. Using Score breaks the consistent naming pattern and causes an error. It should be total = total + score.
Question 4
A MAX_SPEED = 100
B current_speed = 80
C if current_speed > max_speed:
D print('Too fast')
Line C — The constant was named in UPPER_CASE, so it must be referred to by that same name. Writing max_speed breaks the convention and refers to a name that does not exist. It should be if current_speed > MAX_SPEED:.
Question 5
A age = 17
B flag = age >= 18
C if is_adult:
D print('Adult')
Line B — flag is not a meaningful name, so the reader cannot tell what the Boolean stores. A descriptive name such as is_adult makes the condition on the next line read clearly. It should be is_adult = age >= 18.

Student with a class code? Join your class →