CEMPAKA INTERNATIONAL SCHOOL, DAMANSARA HEIGHTS
Computer Science Assignment – Pseudocode
1. Write a pseudocode that allows to enter the age.
If the age is less than 18, the code should output the message Child,
otherwise, it should output the message Adult.
2. Write a pseudocode that allows to enter three test results and calculate the
average.
If the average is 50 or above, the code should output the message ‘Pass’
and if it is below 50, it should output the message ‘Fail’.
3. Write a pseudocode for the following.
A shop gives a discount of 5 per cent on purchases over £100, up to a
maximum of £50.
If the amount to be discounted would be greater than this, it has to be
reduced back to £50.
4. In a multiple-choice question there are four possible answers, labelled A,
B, C and D. To select the answer, the users have to enter one of these
letters.
They will then be informed if they are correct or incorrect. There should
also be a method to inform if they enter a letter other than the four
allowed.
(In this case, the correct answer is option C.)
Write the pseudocode for this.