Question

3. Calculates the final amount (A). The program uses four inputs: P, n,r, and t. Hint: nt 1 = P(1+3) Where • P = principal am

in python language.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student,

below i have written the complete Python program as per the requirement.

=============================================================

Program:

=============================================================

#Enter the input values
P = float(input("Enter the principal amount: "))
r = float(input("Enter the annual nominal interest rate: "))
n = int(input("Enter the number of times the interest compounded per year: "))
t = int(input("Enter number of years: "))

#Calculate the final amount
A = P * ( 1 + r/n) ** (n * t)

#Display the final amount
print("Final amount is: ", round(A, 2))

=============================================================

Screen shot of the program:

#Enter the input values P = float(input(Enter the principal amount: )) float(input(Enter the annual nominal interest rate:

=============================================================

Sample Output:

nirmalsharma@ubuntu:~$ python3 Final_Amount.py Enter the principal amount: 1000 Enter the annual nominal interest rate: 0.10

=============================================================

Kindly Check and Verify Thanks..!!!

Add a comment
Know the answer?
Add Answer to:
in python language. 3. Calculates the final amount (A). The program uses four inputs: P, n,r,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The following equation gives the amount of money owed on a loan after a certain amount...

    The following equation gives the amount of money owed on a loan after a certain amount of time if no payments are made. A = P ( 1 + r/n ) ^nt where: A = the amortized amount (total loan/investment amount over the life of the loan/investment) P = the initial amount of the loan/investment r = the annual rate of interes t n = the number of times interest is compounded each year t = the time in years...

  • Programming language: PYTHON Prompt: You will be creating a program to show final investment amounts from...

    Programming language: PYTHON Prompt: You will be creating a program to show final investment amounts from a principal using simple or compound interest. First, get a principal amount from the user. Next, ask the user if simple or compound interest should be used. If the user types in anything other than these options, ask again until a correct option is chosen. Ask the user to type in the interest rate as a percentage from 0 to 100%. Finally, ask the...

  • Write a program that calculates the amount of money that you must invest In a savings...

    Write a program that calculates the amount of money that you must invest In a savings account at a given interest rate for a given number of years to have a certain dollar amount at me end of the period Y our program will ask the user for the amount the user wants to have at the end of the term (future value). the number of years the user plans to let the money stay in the account, and the...

  • Data Programming l - Python Write a program that takes the terms of a loan as...

    Data Programming l - Python Write a program that takes the terms of a loan as inputs(principal, interest rate as a %, number of payments per year, and the total number of years), computes the interest paid over the life of the loan and produces the output shown below. The examples shown below are for: Borrowing $100,000 for a condo financed over 30 years with 12 payments per year at 4.5%. Borrowing $25,000 for a car financed over 6 years...

  • Write a program in Python that computes the interest accrued on an account. You can modify...

    Write a program in Python that computes the interest accrued on an account. You can modify the “futval.py” program given in Chapter 2 to accomplish it. Your program should use a counted loop rather than a formula. It should prompt the user to enter the principal amount, the yearly interest rate as a decimal number, the number of compounding periods in a year, and the duration. It should display the principal value at the end of the duration. To compute...

  • The program is in python :) Write a code program to calculate the mortgage payment. The...

    The program is in python :) Write a code program to calculate the mortgage payment. The equation for calculating the mortgage payment is: M = P (1+r)n (1+r)n-1 Where: M is your monthly payment P is your principal r is your monthly interest rate, calculated by dividing your annual interest rate by 12. n is your number of payments (the number of months you will be paying the loan) Example: You have a $100,000 mortgage loan with 6 percent annual...

  • Write a python program for the below question? Car Loan If A dollars is borrowed at...

    Write a python program for the below question? Car Loan If A dollars is borrowed at r% interest compounded monthly to purchase a car with monthly payments for n years, then the monthly payment is given by the formula monthly payment = i / 1 - (1 + i)-12n . A where i = r/1200. Write a program that calculates the monthly payment after the user gives the amount of the loan, the interest rate, and the number of years.

  • USING PYTHON PROGRAMING LANGUAGE Write a program that first asks the user to enter a “special”...

    USING PYTHON PROGRAMING LANGUAGE Write a program that first asks the user to enter a “special” letter. The program should then ask the user to enter a single line sentence containing all lowercase letters and no punctuation, except for a period at the end. The program will then output the number of times that this letter appears in the sentence. Example: Enter a special letter: t Enter a sentence: here is my little sentence. Your letter appears 3 times. (t...

  • . (Financial application: compound value) If you start a bank account with $10,000 and your bank...

    . (Financial application: compound value) If you start a bank account with $10,000 and your bank compounds the interest quarterly (4 times per year) at an interest rate of 8%, how much money do you have at the year's end? (assume that you do not add or withdraw any money from the account). A=P(1+r/n)n * t A: Final amount, r: interest rate, P: principal amount, n: number of times per year interest is compounded, t: number of years must be...

  • 14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount...

    14.Compound Interest hank account pays compound interest, it pays interest not only on the principal amount that was deposited into the account, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the account earn compound interest for a certain number of years. The formula for calculating the balance of the account afer a specified namber of years is The terms in the formula are A is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT