Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
18 views1 page

Cempaka International School, Damansara Heights Computer Science Assignment - Pseudocode

The document contains 4 pseudocode problems: 1) check if age is above or below 18, 2) calculate average of 3 test scores and check if pass or fail, 3) calculate discount on purchases over £100 up to £50 maximum, 4) check answer to multiple choice question and handle invalid inputs.

Uploaded by

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

Cempaka International School, Damansara Heights Computer Science Assignment - Pseudocode

The document contains 4 pseudocode problems: 1) check if age is above or below 18, 2) calculate average of 3 test scores and check if pass or fail, 3) calculate discount on purchases over £100 up to £50 maximum, 4) check answer to multiple choice question and handle invalid inputs.

Uploaded by

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

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.

You might also like