Question: write a program to calculate grade in PHP User can enter the commands: a Enter an assessment r Print the Report q Quit the program
write a program to calculate grade in PHP
User can enter the commands:
a Enter an assessment
r Print the Report
q Quit the program
Requirements:
If the student is absent for assessments that more than 30% of the weighted total of the exams they receive a UN regardless of their weighted average.
If the student achieves 50% or greater weighted average then they pass.
If the student achieves less than 50% weighted average then they fail.
Example of entering assessments:
Please enter your command in the form of (a, r, q): a
Please enter the name of the assessment: quiz 1
Please enter the number of points for the assessment: 10
Was the student absent? (y/n): n
Please enter the student's score for the assessment: 6
Please enter your command in the form of (a, r, q): a
Please enter the name of the assessment: quiz 2
Please enter the number of points for the assessment: 10
Was the student absent? (y/n): n
Please enter the student's score for the assessment: 4
Please enter your command in the form of (a, r, q): a
Please enter the name of the assessment: quiz 3
Please enter the number of points for the assessment: 10
Was the student absent? (y/n): y
The student has been marked absent for this assignment.
Print report:
-------------------------
Assignment: quiz 1
Total Points: 10
Total Score: 6
Missed: n
---------------------------
Assignment: quiz 2
Total Points: 10
Total Score: 4
Missed: n
---------------------------
Assignment: quiz 3
Total Points: 10
Total Score: 0
Missed: y
-------------------------
Final Report
Weighted Average: 33%
Missed Percentage: 33%
Outcome: UN
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
