← VCE Software Development U3O1

Camel casing

Camel casing: join words with no spaces, start with a lower case letter, then capitalise the first letter of each later word, e.g. studentFirstName or calculateTotal.

Understanding Camel casing in VCE Software Development U3O1

What it does: The first word 'final' stays lower case and the second word 'Mark' is capitalised, with no space or underscore between them. Camel case joins the words with no spaces. Names with spaces are not valid in most languages.

Common mistakes: Camel case must start with a lower case letter. StudentLastName starts with a capital, which is Pascal case. It should be studentLastName. Function names in camel case have no underscores. Each new word starts with a capital letter. It should be calculateTotal.

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 48–71) 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 variable name is written in camel case?
studentFirstNameStudentFirstName
Matches
StudentFirstName = "Ava"
↓
The name starts with a capital S. Camel case must start with a lower case letter, so it should be studentFirstName.
Applying
Meanings
Term
studentFirstName
Meaning
Camel casing: join words with no spaces, start with a lower case letter, then capitalise the first letter of each later word, e.g. studentFirstName or calculateTotal.
Practice
def calculateTotal(itemPrice, itemQty):
Testing
Gaps
= "Ava"
Check Answer
Spots
1studentFirstName = 'Ava'
2StudentLastName = 'Nguyen'

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

The 'Walrus' badge — Method Master, 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 variable name is written in camel case?
A. StudentFirstName
B. studentFirstName ✓
Camel case starts with a lower case letter. StudentFirstName starts with a capital, so it is Pascal case.
2. Which name is written in camel case?
A. totalScore ✓
B. total_score
Camel case has no underscores. The second word is capitalised instead: totalScore. total_score is snake case.
3. Which function name follows camel case?
A. calculatetotal
B. calculateTotal ✓
Each word after the first needs a capital letter. calculatetotal runs the words together with no capital, so the words are hard to see.
4. Which name breaks the camel case pattern?
A. Student_age ✓
B. studentAge
Student_age starts with a capital and uses an underscore. Camel case would be studentAge.
5. Which is the correct camel case version of the words 'average test mark'?
A. averageTestMark ✓
B. AverageTestMark
Start with a lower case letter, then capitalise the first letter of each later word: averageTestMark.

Match the Pairs

studentFirstName → A variable name in camel case: no spaces, starts lower case, and each later word starts with a capital
calculateTotal() → A function name in camel case: the first word is lower case and the next word is capitalised
Camel case variable name made from the words 'final mark' → finalMark = 85
Camel case function name made from the words 'get high score' → def getHighScore():
StudentFirstName = "Ava" → The name starts with a capital S. Camel case must start with a lower case letter, so it should be studentFirstName.
def calculate_total(): → The name uses an underscore (snake case) instead of capitalising the second word. In camel case it should be calculateTotal.

Key Term

studentFirstName
Camel casing: join words with no spaces, start with a lower case letter, then capitalise the first letter of each later word, e.g. studentFirstName or calculateTotal.

Fill in the Blanks

1. studentFirstName = "Ava"
Hint: Type a camel case variable name made from the words student, first and name.
2. def calculateTotal(price, qty): return price * qty
Hint: Type a camel case function name made from the words calculate and total.
3. firstName = "Liam" lastName = "Smith" fullName = firstName + " " + lastName
Hint: Type the camel case variable that holds the surname, which was created on an earlier line.
4. for studentName in names: print(studentName)
Hint: Type the loop variable name in camel case. It is used again on the next line.
5. def getAverageMark(m1, m2): return (m1 + m2) / 2 avgMark = getAverageMark(80, 90)
Hint: Type the camel case function name to call. It matches the name defined on the first line.

Spot the Error

Question 1
A studentFirstName = 'Ava'
B StudentLastName = 'Nguyen'
C fullName = studentFirstName
D print(fullName)
Line B — Camel case must start with a lower case letter. StudentLastName starts with a capital, which is Pascal case. It should be studentLastName.
Question 2
A def calculate_total(a, b):
B return a * b
C total = calculateTotal(3, 5)
D print(total)
Line A — Function names in camel case have no underscores. Each new word starts with a capital letter. It should be calculateTotal.
Question 3
A itemPrice = 4.5
B itemCount = 3
C cost = itemPrice * itemCount
D totalcost = cost * 1.1
E print(totalCost)
Line D — The second word must start with a capital letter in camel case. totalcost runs the words together in lower case. It should be totalCost.
Question 4
A def showGreeting(name):
B hello_text = 'Hi ' + name
C print(helloText)
D showGreeting('Ava')
Line B — hello_text is snake case because it uses an underscore. Camel case joins the words and capitalises the second one. It should be helloText.
Question 5
A playerScore = 0
B bonusPoints = 10
C PlayerScore += bonusPoints
D print(playerScore)
Line C — A camel case name starts with a lower case letter. PlayerScore starts with a capital, so it breaks the pattern. It should be playerScore.

Student with a class code? Join your class →