Duality Group Interview Question

How to do some simple financial computations in python.