04 Exactly a third: Made Python solution easier to read; added Scala solution