15 mark question Flashcards

1
Q

What is the Order

A
  • DECLARE
  • CONSTANT
  • 0
  • NEXT
  • STUDENT COUNTER
  • GRADE
  • OUTPUT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

DECLARE

A
  • DECLARE TotalMark : ARRAY[1:50] OF INTEGER
  • DECLARE AverageMark : ARRAY[1:50] OF INTEGER
  • DECLARE SubjectCounter : INTEGER
  • DECLARE StudentCounter : INTEGER
  • DECLARE DistinctionNo : INTEGER
  • DECLARE MeritNo : INTEGER
  • DECLARE PassNo : INTEGER
  • DECLARE FailNo : INTEGER
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

CONSTANT

A

CONSTANT Distinction = 70
CONSTANT Merit = 55
CONSTANT Pass = 40

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

0

A

DistinctionNo ← 0
MeritNo ← 0
PassNo ← 0
FailNo ← 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

NEXT

A

FOR StudentCounter ← 1 to ClassSize
TotalMark[StudentCounter] ← 0
NEXT StudentCounter
FOR StudentCounter ← 1 to ClassSize
FOR SubjectCounter ← 1 to SubjectNo
TotalMark[StudentCounter] ← TotalMark[StudentCounter] + StudentMark[StudentCounter,
SubjectCounter]
NEXT SubjectCounter
AverageMark[StudentCounter] ← INT((TotalMark[StudentCounter] / SubjectNo) + 0.5)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

STUDENT COUNTER

A

OUTPUT “Name “, StudentName[StudentCounter]
OUTPUT “Combined total mark “, TotalMark[StudentCounter]
OUTPUT “Average mark “, AverageMark[StudentCounter]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

GRADE

A

IF AverageMark[StudentCounter] >= Distinction
THEN
DistinctionNo ← DistinctionNo + 1
OUTPUT “Grade Distinction”
ELSE
IF AverageMark[StudentCounter] >= Merit
THEN
MeritNo ← MeritNo + 1
OUTPUT “Grade Merit”
ELSE
IF AverageMark[StudentCounter] >= Pass
THEN
PassNo ← PassNo + 1
OUTPUT “Grade Pass”
ELSE
FailNo ← FailNo + 1
OUTPUT “Grade Fail”
ENDIF
ENDIF
ENDIF
NEXT StudentCounter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

OUTPUT

A

OUTPUT “Number of Distinctions “, DistinctionNo
OUTPUT “Number of Merits “, MeritNo
OUTPUT “Number of Passes “, PassNo
OUTPUT “Number of Fails “, FailNo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly