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.
Create, interpret, correct, complete, and refine algorithms using: Pseudocode
2.1.2 Designing, creating and refining algorithms
Practise exam questionsDesigning, creating and refining algorithms — Note 3 of 7
Complete, write or refine an algorithm
Pseudocode is a simplified, informal way of describing an algorithm that is closer to human language than programming code, but structured like code. OCR uses its own Exam Reference Language as pseudocode in exams. You need to be able to write, read, complete, correct, and refine algorithms written in pseudocode, including using sequence, selection, and iteration.
if/then/else/endif, for/next, while/endwhile, do/until.// Ask user for a number between 1 and 10
valid = False
while valid == False
num = input("Enter a number 1-10: ")
num = int(num)
if num >= 1 AND num <= 10 then
valid = True
else
print("Invalid, try again.")
endif
endwhile
print("You entered: " + str(num))x > y as x < y. That misses the case where the two are EQUAL: the opposite of x > y is x <= y. Check that every value, including equal ones, goes down a branch.Ready to test yourself?
Practise 2.1.2 questions