Question: Students at a high school receive letter grades based on the following scale: Score Letter Grade 90 or above A Between 80 and 89 inclusive

Students at a high school receive letter grades based on the following scale:

Score

Letter Grade

90 or above

A

Between 80 and 89 inclusive

B

Between 70 and 79 inclusive

C

Below 70

D

Which of the following code segments will display the correct grade for a given score?

  1. IF(score 90)

{

DISPLAY(A)

}

IF(score 80 AND score 89)

{

DISPLAY(B)

}

IF(score 70 AND score 79)

{

DISPLAY(C)

}

IF(score < 70)

{

DISPLAY(D)

}

  1. IF(score 90)

{

DISPLAY(A)

}

ELSE

{

IF(score 80 AND score 89)

{

DISPLAY(B)

}

ELSE

{

IF(score 70 AND score 79)

{

DISPLAY(C)

}

ELSE

{

DISPLAY(D)

}

}

}

  1. IF(score < 70)

{

DISPLAY(D)

}

IF(score 70 AND score 79)

{

DISPLAY(C)

}

IF(score 80 AND score 89)

{

DISPLAY(B)

}

IF(score 90)

{

DISPLAY(A)

}

  1. I only

  2. II only

  3. III only

  4. I and II only

  5. II and III only

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!