8.1 Binary representation of a decimal number between 0 and 31 by playing musical notes

Python solution