CEMC Banner

Problem of the Week
Problem C
A Solo Trio

Sandip is writing a computer program that will play sounds that imitate a piano, cello, and violin. He has commands that start or stop the sound of each instrument, as well as a command to wait for a given period of time while the instruments play. He uses these commands to write the following program.

REPEAT 10 times:

  1. How long does it take for the program to execute completely from start to finish? Assume that Sandip’s computer is so fast that it doesn’t take any time at all to execute each command.

  2. Which instruments are playing exactly \(33\) seconds after the program starts running?


Theme: Computational Thinking