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?
-
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)
}
-
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)
}
}
}
-
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)
}
-
I only
-
II only
-
III only
-
I and II only
-
II and III only
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
