Form 3 computer assignment :
2010. (a) Machine language programs are more difficult to write than high-level language
programs. State two reasons for this. (2 marks)
(b) In order to process examination results of students in a school, their names, index
numbers and scores in 11 subjects are required. The average score for each student
is then determined and a grade assigned. This process is repeated for all 40 students in
a class.
Draw a flowchart to:
• Read a student's name, index number and the scores in all the subjects.
• Determine the student's average score.
• Assign a grade to the student depending on the average score as follows:
Score Grade
80 < score A
60 < score < 80 B
40 < score < 60 C
score < 40 F
• Display the student's name, index number, average score and the grade.
• Repeat the above steps for all the students in the class. (10 marks)
(c) Below is a list of program segments in different generations of programming languages.
Identify the language for each. (3 marks)
(i) LDA 105
SUB 40
ADD 20
(ii) 10000110 10111101
01111000 0001100
(i) For x: = 1 to 10 do
Write (x);
2011. (a) Give two characteristics of scripting languages. (2 marks)
(b) Describe two types of errors that may be detected during program testing. (4 marks)
(c) A company’s workers travel to work either by public or by private means. All workers
are paid a travel allowance of Ksh. 200, but those using private means are paid an
additional Ksh. 100.
(i) Write a pseudocode to determine a worker’s travel allowance. (3 marks)
(ii) Draw a flowchart to determine a worker’s travel allowance. (4 marks)
(iii) Other than occupying large space, state two disadvantages of using a flowchart
instead of a pseudocode. (2 marks)
2012. (a) State the use of each of the following flowchart symbols. (3 marks)
(i)
ii)
(iii)
(b) Below is an algorithm that is used to compute the values of R, S and T.
P=5
Q=6
INPUT N
If N is GREATER OR EQUAL TO 10
R = P *Q
S = Q -P
T=P+Q+R+S
ELSE
R=P+Q
S=Q
T=R+S
END IF
PRINT R, S and T
From the algorithm, determine the output if the input value of N is:
(i) 7; (3 marks)
(ii) 10. (3 marks)
(c) Draw a flowchart for the algorithm in Question 16 (b).(6 marks)
2013. (a) Figure 3 shows a flowchart. Use it to answer the questions that follow.
(i) Determine the output from the flowchart if:
I. X = 5; (2 marks)
II. X = 7.(2 marks)
(ii) Write a Pseudocode for the flowchart in figure 3. (5 marks)
(iii) Modify the flowchart so that it can be used to get the sum of integers between
50 and 100. (4 marks)
(b) List two programming language translators. (2 marks)
2014.(a). Highlight three advantages of structured programming. (3mks)
b). A trader bought a car from a manufacturer and later sold the car to another person. Design a
pseudocode that will accept the buying price and the selling price of the car, determine whether
the trader made a profit /or loss, calculate the profit/loss and display it.
(5mks)
b) Design a flowchart for the above case. (7mks)
1.
(a) Mention three characteristics of web scripting language (3mks)
(b) List three things which are considered as improper use of language rule
which may cause syntax errors (3mks)
(c) Mumias sugar company pays casual employees based on the number of
hours worked as follows
Less than 10 hours @ khs.100/= per hour
Up to 15 hours @ khs150/= per hour
More than 15 hours @khs200/= /per hour
(i) Write a pseudo code that will prompt the user to input the name, rate hours
worked. The pseudo code should output the name, hours worked and the
wage paid for five employees (4mks)
(ii) Draw a flowchart for the pseudo code (5mks)