A programmer has written a procedure to apply a promotional discount to specific items in a bookstore inventory list. The list inv stores items in the format [itemID, title, genre, price].
PROCEDURE applyDiscount()
BEGIN PROCEDURE
FOR x FROM 0 TO LENGTH(inv) - 1 DO
IF inv[x,2] == "Fiction" THEN
SET inv[x,3] TO inv[x,3] * 0.85
END IF
END FOR
END PROCEDURE
State two changes that could be made to this pseudocode to improve its readability.
51 exam-style questions on Edexcel GCSE Computer Science Develop code, covering Decomposition and abstraction to solve problems, Read, write, analyse and refine programs, Converting algorithms into programs, Techniques for readable, maintainable code, Identifying and correcting program errors, and Evaluating program fitness and efficiency. Each one has a worked solution and a mark scheme showing where the marks go.