Software Engineering › Learn step by step › Y11 Programming Fundamentals
Item 71 of 426 · Year 11: Programming Fundamentals, 25 of 69
Function v procedure
Term
Jump to a topic
- Exam format, question types and command words (46)
- Year 11: Programming Fundamentals (69)
- Year 11: The Object-Oriented Paradigm (33)
- Year 11: Programming Mechatronics (29)
- Year 12: Secure Software Architecture (57)
- Year 12: Programming for the Web (59)
- Year 12: Software Automation (35)
- Year 12: The Software Engineering Project (47)
- Diagrams and modelling tools (18)
- Python, SQL, pseudocode and CSS patterns (33)
Definition
A function returns a value to the caller (RETURN); a procedure carries out a task and does not return a value.
Example: 'def calc_total(a, b): return a + b' is a function.
Found in: syllabus, course specifications, 2025 HSC marking guidelines, sample exam and familiarisation guidelines, school notes, past SDD papers.
Where you'll use it in the test
Syllabus area: Y11 Programming Fundamentals.
Question types it can appear in
- Python: def with return
- Pseudocode: Use it correctly in the exam pseudocode editor.
- Multiple choice: Pick the option that matches the definition or example.
Where it has appeared in the paper
The Software Engineering Project (Part B, C). Part letters follow each paper’s own layout.
Related past questions
- Sample exam Q21b (5 marks): Python: subroutines, lists, loops The Software Engineering Project (Part B) · 5 marks
- Familiarisation Q13 (6 marks): Python: lists, loops, selection The Software Engineering Project (Part C) · 6 marks
How to use it
A model sentence
“A function returns a value to the caller (RETURN); a procedure carries out a task and does not return a value.” Then apply it: 'def calc_total(a, b): return a + b' is a function.
In a short answer, give the definition in your own words first, then tie it to the situation in the question. Do not copy the example above unless it fits the scenario.
Official worked answer
Sample exam Q21b (5 marks): Python: subroutines, lists, loops (5 marks): official criteria and sample answer
Criteria
5: Substantially correct Python program that places each subject in the correct period; displays all 5 days; provides appropriate subroutines; programmatically builds the timetable. 4: Most requirements. 3: Some requirements. 2: One requirement. 1: Some understanding.
Sample answer
subjects = ["English", "Software", "Drama", "Science", "Art"] NUM_DAYS = 5 NUM_PERIODS = 5 DAYS_OF_WEEK = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
def create_timetable(subjects): timetable = [] for day in range(NUM_DAYS): periods = [] for period in range(NUM_PERIODS): periods.append(subjects[(period - day) % NUM_PERIODS]) timetable.append(periods) return timetable
def print_timetable(timetable): print() for day in range(NUM_DAYS): print(f"{DAYS_OF_WEEK[day]}") for period in range(NUM_PERIODS): print(f"\tPeriod {period+1}: {timetable[day][period]}") print()
timetable = create_timetable(subjects) print_timetable(timetable)
Go deeper
- Flashcard: Function v procedure in Programming Fundamentals (Year 11) · study that set
- Memorise: Software development steps and algorithm design
- Full term page: every question, note and marking comment for Function v procedure
Check yourself
Explain “Function v procedure” in one sentence, give an example, and name a question type that could test it.
Reveal the answer
A function returns a value to the caller (RETURN); a procedure carries out a task and does not return a value.
Example: 'def calc_total(a, b): return a + b' is a function.
Could be tested as: Python, Pseudocode, Multiple choice.