Based on the grading scale below, what is the most efficient way of determining a grade?• A if the grade percentage is greater than or equal to 90• B if it's greater than or equal to 80 and less than 90• C if it's greater than or equal to 70 and less than 80• D if it's greater than or equal to 60 and less than 70• F if the grade percentage is less than 60
A. Test each condition separately.
B. Test the score for a value between 80 and 90 only if the first condition is false.
C. Test to see whether the percentage is 90 or higher.
D. Test to see whether the percentage is less than 60.
Answer: B
Computer Science & Information Technology