'''
Created on Jun 17, 2013

@author: Jared

Small example illustrating the use of the pow method in the Math class.
Python translation of Arup's code
'''

def main(): 
        # Get user information.
        money = float(input("Enter the principle.\n"))
        rate = float(input("Enter the rate.\n"))
        numyears = float(input("Enter the number of years.\n"))

        # Make the calculation for new money.
        total = money * pow(1 + rate, numyears)

        # Print out the earnings.
        print("You earned " + str(total - money) + ".")

# runs main module on startup
if __name__ == "__main__":
    main()
