Final answer:
The program playwaltz.py checks the correctness of inputs and plays a waltz to standard audio
Step-by-step explanation:
playwaltz.py
To write the program playwaltz.py, you can use a programming language like Python. The program should accept a sequence of 32 integers as input, which represent the 32 measures of a waltz. Before playing any audio, the program needs to check if the inputs are correct. If the number of measures is not exactly 32, the program should exit with the error message 'A waltz must contain exactly 32 measures'. If a minuet measure is not between 1 and 176 (both inclusive), the program should exit with the error message 'A minuet measure must be from 1 to 176'. If a trio measure is not between 1 and 96 (both exclusive), the program should exit with the error message 'A trio measure must be from 1 to 96'.