Snake casing
A naming convention that writes every letter in lower case and joins words with underscores, e.g. student_first_name. Python uses it for variables and functions.
Understanding Snake casing in VCE Software Development U3O1
What it does: The function name calculate_total_price is all lower case with underscores, which follows the snake case convention for Python functions. To convert from camel case, put an underscore before each capital letter and change that letter to lower case. Variable names cannot contain spaces. Snake casing replaces each space with an underscore. Each word must be separated by an underscore. Without underscores the words run together and are hard to read. A hyphen is read as a minus sign in Python, so user-age would subtract. Use an underscore instead. UPPER_SNAKE_CASE is the snake case style used for constants, so readers know the value should not change.
Common mistakes: lastName is camelCase. Python variables use snake_case, so it should be last_name. The print line also expects last_name. The function is defined as get_total, but this call uses camelCase. Function names in snake_case must be called with the same name: get_total(2, 3).
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.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
snake_caseFill in the Blanks
Spot the Error
Student with a class code? Join your class →