Software Engineering › Learn step by step › Python, SQL and pseudocode
Item 409 of 426 · Python, SQL, pseudocode and CSS patterns, 16 of 33
Python lists
Code pattern
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 list stores ordered items: append(), remove(), len(), sorting with sort(), looping, and 2D lists as a list of lists.
Example
grid = [[0]*3 for _ in range(3)]Found in: syllabus, course specifications, 2025 HSC marking guidelines, school notes, past SDD papers.
Where you'll use it in the test
Syllabus area: Code patterns.
Question types it can appear in
- Python: Write or complete it in the online Python tool.
- Code reading: Code or algorithm reading: interpret a fragment and state its output or purpose.
Where it has appeared in the paper
The Software Engineering Project (Part A, B, C). Part letters follow each paper’s own layout.
Related past questions
- 2025 HSC Q26 (5 marks): Design, construct and implement a solution (Python) The Software Engineering Project (Part A) · 5 marks
- Familiarisation Q13 (6 marks): Python: lists, loops, selection The Software Engineering Project (Part C) · 6 marks
- Sample exam Q21b (5 marks): Python: subroutines, lists, loops The Software Engineering Project (Part B) · 5 marks
How to use it
A model sentence
Code pattern: “A list stores ordered items: append(), remove(), len(), sorting with sort(), looping, and 2D lists as a list of lists.” Then apply it: grid = [[0]*3 for _ in range(3)]
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
Familiarisation Q13 (6 marks): Python: lists, loops, selection (6 marks): official criteria and sample answer
Criteria
6: Substantially correct solution with ALL of: looping correctly; referring to the contents of the data structure correctly; displaying the player's scores and corresponding points as shown; calculating the total points; taking bonus points into account; handling the final round correctly. 5: Most features. 3-4: Some features. 2: One feature. 1: Some understanding.
Sample answer
Input code
scores = [3,5,5,2,1,4,0,1,4,5]
Display the scores and points
Header row
print("Round\tScore\tPoints") totalPoints = 0
Calculate the points and print
for i in range(len(scores)): roundNumber = i + 1 score = scores[i] points = score
# Check if any bonuses apply and NOT the final round
if points == 5 and i != 9:
# Add the points from the next round as bonus points
points += scores[i + 1]
# Check if the final round bonus applies
if points == 5 and i == 9:
# Give the bonus points of 10
points = 10
# Add to the total points tally
totalPoints += points
# Print the results
print(str(roundNumber) + "\t" + str(score) + "\t" + str(points))
print("\nTOTAL POINTS: " + str(totalPoints))
Go deeper
- Flashcard: Python lists in Code Patterns: Pseudocode, Python, SQL, CSS (Years 11 and 12) · study that set
- Memorise: Python basics: input, selection, loops, strings
- Full term page: every question, note and marking comment for Python lists
Check yourself
Write or say the “Python lists” pattern from memory: the syntax and what it does.
Reveal the answer
A list stores ordered items: append(), remove(), len(), sorting with sort(), looping, and 2D lists as a list of lists.
Example: grid = [[0]*3 for _ in range(3)]
Could be tested as: Python, Code reading.