C. What would be played on the radio if the following statement is executed?
if hour >= 8 a.m but < 5 pm AND day = “Monday” OR “Friday”
then play “It’s Another Manic ”
else if day = Wednesday AND Thursday
then play “Another Workday Tomorrow”
else if hour > 9 pm = play “Twinkle, Twinkle Little Star”
else play “ Saturdays and Sundays are my favorite days”
Hour = 9:00 am day = Tuesday
Hour = 7:00 am day = Wednesday
Hour = 6:00 pm day = Sunday
Hour = 10 pm day = Thursday
Share
Answer:
Hour = 9:00 am day = Tuesday -> "It's Another Manic" would be played on the radio.
Hour = 7:00 am day = Wednesday -> "Another Workday Tomorrow" would be played on the radio.
Hour = 6:00 pm day = Sunday -> "Saturdays and Sundays are my favorite days" would be played on the radio.
Hour = 10 pm day = Thursday -> "Twinkle, Twinkle Little Star" would be played on the radio.
Explanation: