how to calculate percentage in python 3