Python 3 Math Function