Question
Write the pseudocode for the scenario below. (Marks: 40) A teacher has a class of 10 learners who recently wrote a test. The teacher would
Write the pseudocode for the scenario below.
(Marks: 40)
A teacher has a class of 10 learners who recently wrote a test. The teacher would like to
determine the average class mark and the name of the student with the highest mark. Verify that
the marks input by the teacher fall in the range 0 to 100. For any mark input that is outside of this
range, the user must repeat the process and input the mark until it is within the range.
The values below are an example of the names and marks for this scenario and explanation. The
teacher will input their own data.
Example Data
Names - string
Joe
Mpho
Kyle
Susan
Thando
Refilwe
John
Katlego
Joyce
Sisanda
Marks - numeric
68
56
43
49
76
80
50
75
63
44
You are required to do the following for the teacher:
Display the student's name with their corresponding mark and category.
O
Any learner with a mark equal to or above 75 display "Distinction" next to their mark.
For those learners with a mark less than 50, display "Fail".
O
All the other students must have the word "Pass" next to their mark.
Display the name of the learner with the highest mark.
Calculate and display the average class mark.
Comment your pseudocode and use descriptive and appropriate messages/labels for the output.
The report must display output as follows:
CLASS REPORT
NAME
Joe
Mpho
Kyle
Susan
Thando
Refilwe
John
Katlego
Joyce
Sisanda
MARK ACHIEVED
68
56
43
49
76
80
50
75
63
44
CATEGORY
Pass
Pass
Fail
Fail
Distinction
Distinction
Pass
Distinction
Pass
Fail
HIGHEST MARK:
Refilwe
AVERAGE CLASS MARK: 60.4 %
MARK ALLOCATION
Declare and initialise variables
Input student name
Verify that all the marks input are between 0 and 100 (inclusive). If not, then the user
must re-enter that mark
Determine and display "Distinction" next to the student whose mark is greater than or
equal to 75
Determine and display "Pass" next to the student whose mark is in the range 50 to 74
Determine and display "Fail" next to the student whose mark is less than 50
Determine and display the name of the student with highest mark
Calculate and display the average class mark
Comments
TOTAL
3
3
6
3
3
3
12
5
2
40
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started