MG_SoftwareDevelopment_L4_AlgorithmFundametals
MG_SoftwareDevelopment_L4_AlgorithmFundametals
SECTOR: ICT
RTQF LEVEL: 4
DURATION : 3HOURS
INSTRUCTIONS TO CANDIDATE:
Step 4: Add num1 and num2 and assign the result to sum.
sum←num1+num2(1Mark)
Step 6: Stop(0.5Mark)
QUESTION5: Draw the flowchart to show the use of for loop. (2Marks)
MARKING SCHEME:
REFERENCE: Lu1: Describe basic concept of algorithm
QUESTION6: Differentiate while loop from do while loop 5Marks
MARKING SCHEME:
MARKING SCHEME:
Answer: c(1.5Marks)
MARKING SCHEME:
c(2.5Marks)
MARKING SCHEME:
1) Searching algorithms(1Mark)
2) Pathfinding algorithm(1Mark)
3) Sorting algorithms(1Mark)
4) Compression algorithms(1Mark)
MARKING SCHEME:
Step 1: Start(0.5Marks)
factorial ← 1(0.5Marks)
i ← 1(0.5Marks)
5.2: i ← i+1(0.5Marks)
Step 7: Stop(0.5Marks)
MARKING SCHEME:
QUESTION12: Discuss the Characteristics of an Algorithm (5Marks)
MARKING SCHEME:
10Marks
NB: Each symbol and name take 2 marks.
REFERENCE: Lu1: Describe basic concept of algorithm
MARKING SCHEME:
1. The acronyms stand for Pushing and Popping operations performed
on a stack. These are ways data is stored and retrieved.
(2.5MARKS)
3. PUSH takes two arguments, the name of the stack to add the data to
and the value of the entry to be added. POP only needs the name of
the stack. (2.5MARKS)
4. When the stack is filled and another PUSH command is issued, you
get a stack overflow error, which means that the stack can no longer
accommodate the last PUSH. In POP, a stack underflow error occurs
when you’re trying to POP an already empty stack. (2.5MARKS)
Step 1: Start
Step 4: If a > b
If a > c
Else
Else
If b > c
Else
Step 5: Stop
MARKING SCHEME:
REFERENCE: Lu1: Describe basic concept of algorithm
MARKING SCHEME: