Professional Documents
Culture Documents
FoP Marking Scheme
FoP Marking Scheme
C
Module code: SFPPF301
Year 1
Term 1
Number of Hours per week: 5
Duration: 180 minutes
Date: 25/11/2022
Maximum Marks: 50
Instructions:
1. This question paper has two parts: Part 1: Answer by
True or False, Part 2: Open questions.
2. Do all questions of part 1.
3. In Part 2, answer questions from 1 to 8 and choose
one question between questions 9 and 10
4. For questions 9 or 10, give the list of steps,
pseudocode and the flowchart
Instructor: HATANGIMBABAZI Hilaire
myArray ← [
[1, 2, 3],
[2, 4, 6],
[3, 6, 9],
[4, 8, 12]
]
a. myArray[3][1] evaluates to 8 Answer: True
b. myArray[0][0]+myArray[3][2]=14 Answer: False (myArray[0]
[0]+myArray[3][2]=13)
c. myArray[1][1]←16 is to replace 4 by 6 in mayArray Answer: False (To
replace 4 by 16 in myArray)
Answer:
START
VAR n, sum←0
INPUT n
WHILE n>0
IF (n MOD 10)=0 THEN
n←n/10
ELSE
n←(n-(n MOD 10))
sum←sum+(n MOD 10)
ENDIF
ENDWHILE
OUTPUT sum
STOP
- Flowchart
___________________________END______________________________________________