Answer:
Step-by-step explanation:
def compoundInterest (p, r, t):
f=p*pow((1+r/100), t)
return f
p=0
while p<=0:
p=float( input("\\Enter the present value of the account in dollars : "))
if p<=0:
print("\\Invalid value")
r=0
while r<=0 or r>100:
r=float( input("\\Enter the monthly interest rate as a percentage :"))
if r<=0 or r>100:
print("\\Invalid Value")
t=0
while t<=0:
t=float(input("\\Enter thr number of months :"))
if t<=0:
print("\\Invalid Value")
f=compoundInterest(p, r, t)
print("\\Present Value : $", p)
print("\\Interest Rate : % ", r)
print("\\After ",t , " months, the value of your account will be $ ", f)