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
Practise Edexcel GCSE Computer Science Develop code with exam-style questions for GCSE Computer Science. 57 questions 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, matched to the Edexcel GCSE Computer Science (1CP2) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.