An automated drone telemetry system tracks real-time flight data. A programmer writes a procedure to adjust the altitude readings of drones operating in a specific high-altitude sector to compensate for atmospheric pressure drift.
The 2D array sys_data stores flight records in the format [droneID, sector, altitude, pressure].
PROCEDURE calAlt()
BEGIN PROCEDURE
FOR n FROM 0 TO LENGTH(sys_data) - 1 DO
IF sys_data[n,1] == "Sector_C" THEN
SET sys_data[n,2] TO sys_data[n,2] * 1.042
END IF
END FOR
END PROCEDURE
State two changes that could be made to this pseudocode to improve its readability or maintainability.
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.