Skip to content

Course home

Sign up

Develop code

EasyMediumHard
12345678910111213141516171819
Question 5

State the purpose of this algorithm.

1 SET temp TO 0
2 SET minTemp TO 100
3 SET maxTemp TO -50
4
5 FOR EACH temp FROM "DailyTemps.txt" DO
6     IF (temp < minTemp) THEN
7         SET minTemp TO temp
8     ENDIF
9     IF (temp > maxTemp) THEN
10        SET maxTemp TO temp
11    ENDIF
12 ENDFOR
13
14 SEND minTemp & " " & maxTemp TO DISPLAY
[1]
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