0% found this document useful (0 votes)
3 views2 pages

Computer

The document discusses tools for presenting algorithms, specifically pseudocode and flowcharts. It provides a pseudocode example for reducing a number by 5 until zero, distinguishes between system and program flowcharts, and outlines a scenario for calculating travel allowances for workers. Additionally, it describes a flowchart for assessing admission qualifications based on test scores.

Uploaded by

robinteigut
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)
3 views2 pages

Computer

The document discusses tools for presenting algorithms, specifically pseudocode and flowcharts. It provides a pseudocode example for reducing a number by 5 until zero, distinguishes between system and program flowcharts, and outlines a scenario for calculating travel allowances for workers. Additionally, it describes a flowchart for assessing admission qualifications based on test scores.

Uploaded by

robinteigut
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/ 2

E.

Computer Studies

Required Questions
1.Discuss any two tools that can be used to present an algorithm.
Pseudocode:Pseudocode is a high-level description of an algorithm that combines natural language
elements with programming-like structures
Flowcharts:Flowcharts are graphical representations of algorithms using various shapes and arrows to
represent different steps and decision points.
2. Write a pseudocode using repeat...until loop that would reduce 500 by 5 as it displays the integers
until zero is obtained.
Algorithm: ReduceByFive

Input: None

Output: Display integers as 500 is reduced by 5 until zero or below is reached

BEGIN

num = 500 // Initial value

// Loop to reduce by 5 until num is zero or negative

REPEAT

Display num

num = num - 5

UNTIL num <= 0

END
3. Distinguish between system flowchart and program flowchart.

System flowchart is a type of flowchart that explains the functionality of an entire system. In contrast, a
program flowchart is a type of flowchart that explains how a particular program solves a given task.

4. A company’s workers travel to work either by public or private means. All workers are paid a

travel allowance of Ksh 200, but those using private means are paid an additional Ksh. 100.

a. Write a pseudocode to determine a worker’s travel allowance [3 marks]


b. Draw a flowchart to determine a worker’s travel allowance

5. A form one admission interview consists of four tests; Mathematics, English, Kiswahili and
Science. In order to qualify for admission, an applicant must attain a minimum average of
65% in the four tests and not less than 70% in Mathematics. All applicants must sit for the
interview. Draw a flowchart that would read the scores for each applicant and determine
whether an applicant is successful or not.

You might also like