Ask Question
15 May, 23:35

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.

+1
Answers (1)
  1. 16 May, 03:34
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers