Arthur wants to track the daily active user count for his mobile app over a 30-day trial period.
The pseudocode of an algorithm he has written is shown:
10 d = 0 WHILE d < 30 SET d TO d + 1 RECEIVE u FROM KEYBOARD OUTPUT d, u ENDWHILE
In some programming languages, if a program is written like this on a single line, it could be translated and executed.
Discuss the suitability of this code for humans and how it could be improved.
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.