def annuity(rate, C, months, rate_check, month_check):
if str(rate_check) == "percent":
rate=rate/100
if str(month_check) == 'year':
months = months*12
PV = (C/rate)*(1-(1/(1+rate)**months))
annuity = PV + C
print("The annuity is: {:.2f}$".format(annuity))
def perpetuity(rate, C, rate_check):
if str(rate_check) == "percent":
rate = rate/100
PV = C/rate
print("The perpetuity of your deposit is: {:.2f}$".format(PV))
def futureValue(rate, PV, months, rate_check, month_check):
if str(rate_check) == "percent":
rate = rate/100
if str(month_check) == "year":
months = months*12
FV = float(PV)*(1+float(rate))**float(months)
print("The future value of your deposit is: {:.2f}$".format(FV))
def presentValue(rate, FV, months, rate_check, month_check):
if str(rate_check) == "percent":
rate = rate/100
if str(month_check) == "year":
months = months*12
PV = float(FV)/((1+float(rate))**float(months))
print("The present value of your deposit is: {:.2f}$".format(PV))
The perpetuity of your deposit is: 8333.33$
The future value of your deposit is: 3895.98$
The present value of your deposit is: 256.68$