Where a Function Pays Off — medium Python Fundamentals problem | Incognition