1.2.3 Software Development
Practise exam questionsSoftware Development — Note 3 of 3
Candidates need to be able to write algorithms using pseudocode and/or program code. Candidates need to be able to follow the code as shown in the OCR pseudocode guide, but are not expected to write code in this syntax. Candidate’s code is not expected to be syntactically correct, but must use appropriate code structures.
An algorithm is a sequence of steps to solve a problem. You need to be able to write algorithms in pseudocode or program code, and follow (trace) algorithms written in OCR's pseudocode style to work out what they do.
for i = 0 to 7 ... next i, while ... endwhile, if ... then ... elseif ... else ... endif.Exam tipCommon mistake
A finite sequence of well-defined steps that solves a problem.
for i = 0 to 7 INCLUDES 7 (8 iterations), unlike Python's range(0, 7).function largest(nums)
max = nums[0]
for i = 1 to nums.length - 1
if nums[i] > max then
max = nums[i]
endif
next i
return max
endfunctionReady to test yourself?
Practise 1.2.3 questions