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:
Verified
Q40: A _ performs one set of steps
Q41: Q42: Q43: The JavaScript code for the following algorithm Q44: A selection contained in the scope of Q46: Based on the grading scale below, what Q47: For nested selections that test the same Q48: A(n) _ structure starts with the pseudocode Unlock this Answer For Free Now! View this answer and more for free by performing one of the following actions Scan the QR code to install the App and get 2 free unlocks Unlock quizzes for free by uploading documents