Past questions › hsc2025-q26
2025 5 marks Python / code The Software Engineering Project (Year 12) Design, construct and implement a solution (Python)
NESA 2025 HSC Software Engineering exam (online) - Marking Guidelines
[Exact question wording is not published as a paper (online exam). Task as shown by the NESA marking guidelines/mapping grid: Python program: generate 15 unique random numbers from 1 to 25 and print a 5 by 5 grid, with an X in each grid position whose number is in the list and a blank otherwise. Task inferred from the MG sample answer; the exact stem is not published as text]
Marking criteria
5: Correct Python program that creates a list of unique randomly generated numbers; processes the list correctly; uses selection and looping structures; provides correctly formatted output; uses inbuilt Python functions. 4: Substantially correct, most requirements. 3: Some requirements. 2: One requirement. 1: Some understanding of the problem.
Sample answer
import random
randList = [] for x in range(15): nextInt = random.randint(1,25) while nextInt in randList: nextInt = random.randint(1,25) randList.append(nextInt)
pos = 0 while pos < 25: if pos in randList: print ("| X", end=" ") else: print ("| ", end=" ") pos = pos + 1 if (pos % 5 == 0): print("| \n")