0% found this document useful (0 votes)
7 views4 pages

Handout 2

Uploaded by

NeoK8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Handout 2

Uploaded by

NeoK8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Introduction to algorithms, programming and data

in computer science
Handout 2 – pseudocode
OCR guide
Examination questions will be written in OCR Exam
Reference Language for clarity and consistency, apart
from ‘Design’ and ‘Write’ questions in Component 2 AQA guide
Section B.

See links on right for pseudocode guides. Pearson guide


In Pseudocode task 1:

Notice the importance of sequence in writing the answer to this algorithm, another
approach to that asked would be to start with the highest level and work down to the
lowest.
Paying close attention to the wording of the question is important and should be
stressed to students especially with questions asking for a specific approach like this
one.
Pseudocode task 1

Write an algorithm, according to the sequence below, that takes a user’s mark as
input and outputs:

 "Pass" if they scored on, or over 50


 "Merit if they scored on, or over 70
 "Distinction" if they scored on, or over 90
 or "Fail" if below 50
Pseudocode task 2

Write an algorithm, according to the sequence below, that takes a user’s mark as
input and outputs:

 "Distinction" if they scored on, or over 90


 "Merit if they scored on, or over 70
 "Pass" if they scored on, or over 50
 or "Fail" if below 50

Score = input( “enter your score”)


If score < 50 then
print (“fail”)
If score > = 50 the
Print (“pass”)
If score >= 70 then
Print “Merit”)
Else
Print(“ distinction”)

endif

You might also like