Mr. Jones, is a school teacher. He needs your helps in finding out whether a student passed or failed in the class. There are three subjects( English, Math, Science ) in which the test was given. Each of test has a max score of 100 points.     

Program

Write a program to determine if a student passed or failed in the class based on the test score of the three subject tests.

Requirement

  • The student must score a minimum of 60% in each of the subject tests.
  • The student must score a minimum of 70% across all the three subject tests.

Input

  • Name of the student.
  • Student test scores in English, Maths, and Science tests. 

Output 

  • Whether the student passed or failed the class based on the test scores.
  • Overall % of the score across subjects and whether or not the student passed the class.

Test cases 

No.
Student NameEnglish ScoreMath ScoreScience ScoreResultExplanation
1
Tom Brady879379% 86.33: Pass
2
Jeff Duncan815874% 71.00: FailFailed in Math < 60%
3
Lee Ma878183% 83.66: Passed

4
Lisa Meyers909587% 90.66: Passed

5
Raja Raman696562% 65.33: FailedFailed Overall < 70%
6
Deep Chandan819285% 86.00: Passed

Instructions 

  • Prompt the user to enter the input via the command prompt/shell or initialize it in variables.
  • Write the logic to compute % of individual scores.
  • Display the % scores received in all the tests along with Pass or Fail result.

Improvements 

  • Extends the program to allow Mr. Jones to enter the scores of multiple students once and display the result for all the students in a table.