Solved

The Pseudocode for the Following Problem Is ____

Question 30

Multiple Choice

The pseudocode for the following problem is ____.
Suppose all students in grade 12 at a high school are to be selected for a field trip, but the boys are leaving on the 8:30 a.m. bus and the girls are leaving at 9:00 a.m.


A) If gradeLevel == 12 Then
Display "Enter M for male, or F for female: "
If gender == "M" Then
Display "Your bus leaves at 8:30 a.m."
Else If
Display "Your bus leaves at 9:00 a.m."
End If
End If

B) If gradeLevel == 12; Display "Enter M for male, or F for female: "
If gender == "M" Then;
Display "Your bus leaves at 8:30 a.m."
Else;
Display "Your bus leaves at 9:00 a.m."
End If;
End If

C) If gradeLevel == 12 Then Display "Enter M for male, or F for female: "
Input gender
If gender == "M" Then
Display "Your bus leaves at 8:30 a.m."
Else
Display "Your bus leaves at 9:00 a.m."
End If
End If

D) If gradeLevel >= 12 Then Display "Enter M for male, or F for female: "
If gender == "M"
Display "Your bus leaves at 8:30 a.m."
Else
Display "Your bus leaves at 9:00 a.m."
End
End If

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions