Answer to Question #320878 in Python for leigh

Question #320878

Compound interest


Take in the principle amount interest as % and duration of the investment in years return the accumulated amount 


1
Expert's answer
2022-04-01T02:10:27-0400
invest = float(input("Enter amount of investment: "))
interest = float(input("Enter interest (%): "))
duration = int(input("Enter duration of the investment in years: "))
accum = 0
for i in range(duration):
    accum = ((invest * interest) / 100)
    invest += accum

print("\nAccumulated amount: %.2f" % invest)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS