Exercises part of "Music for Geeks and Nerds" by Pedro Kroger, solutions in Python