Signed up recently but had issues with the confirmation email?
Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.
Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.
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. You may also be given code with errors and asked to find and correct them, or be asked to apply a process described in words by hand.
for i = 0 to 7 ... next i, while ... endwhile, if ... then ... elseif ... else ... endif.for i = 1 to nums.length in largest reads one item too many), the wrong variable used or output, a reversed comparison (== instead of !=), a missing parameter, and the wrong variable after next. Trace with sample values to find them. If a loop must stop when EITHER of two things happens (the item is found, or the data runs out), it should keep looping only while BOTH are false, so the condition needs and, not or. When following pointers, check the code uses the CURRENT position, not the start, and checks for the end before moving on.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
endfunctionA 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).Past exam questions
Ready to test yourself?
Practise 1.2.3 questions