In: Computer Science
We're only writing pseudo code
Homework 30%
Quiz 1 15%
Quiz 2 15%
Final Exam 40%
Total 100%
Mike wants to write a computer program to calculate his final overall average. He knows what percent he earned on each of the four factors that go into calculating his final overall average and can provide those percentages as input. For example, he scored 87.5% on Quiz 1 and when prompted will enter 87.5. Design a solution that will allow Mike, or any other student in the class, to enter the percent scored on each of the 4 factors and return the student's overall average. Express the overall average as a percent (eg. 87.5%).
Pseudo-code
START
DECLARE VARIABLE
ScoreHomework
DECLARE VARIABLE ScoreQuiz1
DECLARE VARIABLE ScoreQuiz2
DECLARE VARIABLE
ScoreFinalExam
DECLARE VARIABLE ScoreTotal
Input ScoreHomework
Input ScoreQuiz1
Input ScoreQuiz2
Input ScoreFinalExam
ScoreHomework =
(ScoreHomework/100) * 30
ScoreQuiz1 = (ScoreQuiz1/100) *
15
ScoreQuiz2 = (ScoreQuiz2/100) *
15
ScoreFinalExam =
(ScoreFinalExam/100) * 40
ScoreTotal = ScoreHomework + ScoreQuiz1 + ScoreQuiz2 + ScoreFinalExam
PRINT "Overall Score: " +
ScoreTotal
END