Skip to content

Course home

Sign up

Develop code

EasyMediumHard
12345678910111213141516171819
Question 13

A software team is developing the autopilot control algorithm for an autonomous delivery drone. Throughout the source code, several key physical thresholds, such as the maximum safe wind speed and minimum voltage limit, are written as raw numerical values (e.g., 18.5 and 11.2).

Explain why replacing these literal values with descriptive, named constants improves both the readability and the maintainability of the codebase.

[2]
Markscheme

Develop code Questions

  1. GCSE
  2. /Computer Science
  3. /Develop code

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.

Question bank