1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dybincka [34]
3 years ago
15

When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the accoun

t, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the balance of the account after a specified number of years is:
A equals P (1 plus r over n )to the power of n t end exponent

The terms in the formula are:
A is the amount of money in the account after the specified number of years.
P is the principal amount that was originally deposited into the account.
r is the annual interest rate.
n is the number of times per year that the interest is compounded.
t is the specified number of year.

Write a program that makes the calculations for you. The program should ask the user to input the following: The amount of principal originally deposited into the account. The annual interest rate paid by the account The number of times per year that the interest is compounded (For example, if interest is compounded monthly, enter 12. If the interest is compounded quarterly, enter 4.) The number of years the account will be left to earn interest. Once the input data has been entered, the program should calculate and display the amount of money that will be in the account after the specified number of years.
Computers and Technology
1 answer:
Tanzania [10]3 years ago
3 0

Answer:

Python code is given below

Explanation:

#This program will calculate compound interest earn by the account after a specified number of years

def main():

   #Asking the user for input

   principal = float(input("Enter the amount of principal amount to be deposited: "))

   rate = float(input("Enter annual interest rate paid by the account: "))

   num = int(input("Enter the number of times per year that the interest is compunded: "))

   years = float(input("Enter the number of years the account will be left to earn interest: "))

   

   #Calculating the balance of the account after a specified number of years

   amount = principal*(1+(rate*.01)/num)**(num*years)

   #Printing result

   print("The amount of money will be in the account after ", years, "years:", round(amount,2))

main()          #calling main() function

You might be interested in
at the grocery store alexa by 1 1/3 lb of ground turkey nasha by two times as much ground turkey is alexa how much ground turkey
Alexeev081 [22]
tasha buys 2 2/3 much ground turkey
8 0
3 years ago
Describe Ms word environment.​
Alexeev081 [22]

On Microsoft Word, you can edit your Word.... You can add pictures, do journals, do menus, and stuff like that... You can add color to text, make lists, add shapes to your Word, etc...

8 0
2 years ago
"the master boot record (mbr) method of partitioning hard drives is limited to what maximum size of drives
Vaselesa [24]
The answer is <span>2TB.  T</span>he master boot record (mbr) method of partitioning hard drives is limited to  2TB.  <span>The </span>Master Boot Record<span> (</span>MBR<span>) is the information in the first </span>sector<span> of any hard disk that identifies how and where an OS is located, so that it can be </span>boot<span> (loaded) into the computer's main storage or RAM.</span>
6 0
3 years ago
What is the default setting Excel shows when Insert is clicked?
NikAS [45]

Answer: entire column

7 1
3 years ago
Read 2 more answers
The color gradient is
Kipish [7]
A range of position dependent colors
8 0
3 years ago
Other questions:
  • Which of the following option is correct about HCatalog?
    14·1 answer
  • What exactly is a byte? A byte is a term that is short for binary digit. 8 bytes hold about one letter, one number, or one speci
    10·1 answer
  • Derek found that the CPU was running several processes. While Derek was looking at Task Manager, the computer crashed. Derek res
    15·2 answers
  • Given a computer running four types of instuctions, named classes A through D, calculate the execution time of a program that ha
    5·1 answer
  • An indicator is a comprehensive analysis of critical information
    8·1 answer
  • It will gain you more knowledge, intensify your soft skills, strong work ethics and grow your network. What is it?​
    12·2 answers
  • Which are types of Internet connections? Choose three answers.
    5·2 answers
  • Beth would like to run an nmap scan against all of the systems on her organization's private network. These include systems in t
    15·1 answer
  • FRee points just put something
    14·2 answers
  • You are creating a query for a website. The query
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!