Software Engineering › Past questions › Pseudocode
Past questions: Pseudocode
3 questions.
2025 3 marks Pseudocode The Software Engineering Project (Year 12) Algorithm design
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: pseudocode RiskRating: the sample answer sums an array Risks of 10 values, then sets Rating to High if Total > 35, Low if Total < 20, otherwise Medium, and displays it]
Marking criteria
3: Substantially correct pseudocode algorithm. 2: Addresses some aspects of the problem. 1: Some understanding of the problem or pseudocode.
Sample answer
BEGIN RiskRating Total = 0 index = 0 REPEAT Total = Total + Risks[index] index = index + 1 UNTIL index = 10 IF Total > 35 THEN Rating = "High" ELSE IF Total < 20 THEN Rating = "Low" ELSE Rating = "Medium" ENDIF ENDIF Display Rating END RiskRating (NESA also accepts a CASEWHERE version: CASEWHERE Total is > 35: Rating = "High" < 20: Rating = "Low" OTHERWISE: Rating = "Medium" END CASE; and an IF / ELSEIF / ELSE version.)
2025 3 marks Pseudocode The Software Engineering Project (Year 12) Algorithm design (subroutines)
NESA HSC Software Engineering Sample Examination + Marking Guidelines (official, 2025)
PseudoPizza sells custom-designed pizzas. The price of a small pizza is $10. Added costs: Medium size $2; Large size $4; each topping $1.50. An algorithm is needed to calculate the cost of pizzas ordered for a customer. The algorithm should calculate and display: the cost of each pizza; the total cost of the order. Write the algorithm using pseudocode. Include at least one subroutine in your answer. You may assume that all inputs are valid. (3 marks)
Marking criteria
3: Substantially correct pseudocode that includes at least ONE subroutine. 2: Addresses some of the requirements. 1: Some understanding of the problem.
Sample answer
BEGIN main Get num_pizzas total_cost = 0 FOR i = 1 TO num_pizzas Get pizza_size Get num_toppings cost_per_pizza = calculate_pizza_cost(pizza_size, num_toppings) DISPLAY cost_per_pizza total_cost = total_cost + cost_per_pizza NEXT i DISPLAY total_cost END main
BEGIN calculate_pizza_cost(size, num_toppings) base_price = 10 topping_price = 1.5 IF size = "Medium" THEN base_price = base_price + 2 ELSEIF size = "Large" THEN base_price = base_price + 4 ENDIF pizza_cost = base_price + num_toppings * topping_price RETURN pizza_cost END calculate_pizza_cost
2025 3 marks Pseudocode The Software Engineering Project (Year 12) Algorithm design (linear search)
NESA 2025 HSC Software Engineering Familiarisation Questions - Marking Guidelines (official, 12 June 2025)
[Question stem not available as text (it is on the interactive NESA familiarisation site). Task per the NESA mapping grid: modify a search algorithm so it achieves its intended purpose (find SearchItem in ItemArray and display its position, otherwise 'Not found')]
Marking criteria
3: Correctly modifies the algorithm to achieve its intended purpose. 2: Corrects some mistakes. 1: Some understanding of the problem.
Sample answer
BEGIN Search (SearchItem) Set LastIndex to the number of elements in ItemArray Found = FALSE Index = 1 WHILE Found = FALSE AND Index < LastIndex + 1 IF ItemArray(Index) = SearchItem THEN Found = TRUE ENDIF Index = Index + 1 ENDWHILE IF Found = TRUE THEN Display 'Position', Index - 1 ELSE Display 'Not found' ENDIF END Search