def future_value(present_value, annual_rate, periods_per_year, years):
<EOL>rate_per_period = annual_rate / float(periods_per_year)<EOL>periods = periods_per_year * years<EOL>return present_value * (<NUM_LIT:1> + rate_per_period) ** periods<EOL>
Calculates the future value of money invested at an anual interest rate,
x times per year, for a given number of years.

Args:
    present_value: int or float, the current value of the money (principal).

    annual_rate: float 0 to 1 e.g., .5 = 50%), the interest rate paid out.

    periods_per_year: int, the number of times money is invested per year.

    years: int, the number of years invested.

Returns:
    Float, the future value of the money invested with compound interest.