Ask Question
14 December, 09:22

Let r be a bank's interest rate in percent per year (APR). An initial amount of money P, also called as principal, will mature to an amount of P (1+r/100) ^n after n years have passed. Write a Python program that takes P, r, and n as inputs from the user and provides as output the matured value after n years. For example if the user provides P, r, and n as 1000 0.95 and 5. Your program must apply the interest-rate formula and provide 1048.4111145526908 as the output.

+3
Answers (1)
  1. 14 December, 09:49
    0
    See explanation below.

    Explanation:

    For this case the program needs to take the inputs as P, r and n and the output would be as A and printed on the system. The code is:

    # Inputs

    P = float (input ("Enter the present value : "))

    r = float (input ("Enter your APR : "))

    n = float (input ("Enter the number of years : "))

    # Output

    A = P * (1 + (r/100)) * *n

    print ("The future values is:", A)

    And the result obtained is:

    Enter the present value : 1000

    Enter your APR : 0.95

    Enter the number of years : 5

    The future values is: 1048.4111145526908
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Let r be a bank's interest rate in percent per year (APR). An initial amount of money P, also called as principal, will mature to an amount ...” in 📗 Engineering if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers