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
andrew-mc [135]
3 years ago
10

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 account earn compound interest for a certain number of years. The formula for calculating the balance of the account after a specified number of years is: A-P(1+m)nt The terms in the fomula are: o A is the amount of money in the account after the specified number of years. o P is the principal amount that was originally deposited into the account. o ris the annual interest rate. o n is the number of times per year that the interest is compounded. o t is the specified number of years. Write a program that makes the calculation for you. The program should ask the user to input the following: o The amount of principal originally deposited into the account o The annual interest rate paid by the account o The number of times per year that the interest is compounded (For example, if interest is compounded monthly, enter 12. If interest is compounded quarterly, enter 4.) o The number of years the account will be left to eam 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. 162 Note: The user should enter the interest rate as a percentage. For example, 2 percent would be entered as 2, not as.02. The program will then have to divide the input by 100 to move the decimal point to the correct position.
Computers and Technology
1 answer:
Talja [164]3 years ago
8 0

Answer:

def main():

   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: "))

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

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

main()        

Explanation:

  • Calculating the balance of the account after a specified number of years  with the help of the formula:
  • amount = principal*(1+(rate*.01)/num)**(num*years)  
You might be interested in
Persons who have been given access to an installation can be counted on to be of no threat. true or false? (antiterrorism scenar
aliya0001 [1]
<span>The statement that "Persons who have been given access to an installation can be counted on to be of no threat" is false. If they are not honest enough, they could become the dangerous staff the company could ever had because he or she has access to everything, files, information, etc. That is why, in selecting a person to be trusted with such responsibility, he or she undergoes an intensive training.</span>
4 0
3 years ago
Write a program that accepts a positive integer N as command-line argument, and outputs True if N is the square of some integer,
Ann [662]

Answer:

In Python:

N = int(input("Positive integer: "))

if N > 0:

   flag = False

   for i in range(1,N+1):

       if i * i == N:

           flag = True

           break

   print(str(flag))

else:

   print("Positive integer only")

   

Explanation:

N = int(input("Positive integer: "))

If the number is positive

if N > 0:

This initializes a boolean variable to false

   flag = False

This iterates from 1 to the input integer

   for i in range(1,N+1):

This checks if th number is a square of some integer

       if i * i == N:

If yes, flag is set to true

           flag = True

The loop is exited

           break

This prints either true or false, depending on the result of the loop

   print(str(flag))

If otherwise, that the number is not positive

<em>else:</em>

<em>    print("Positive integer only")</em>

3 0
3 years ago
When the "swen" virus infected someone's system, it made significant changes to the registry that caused it to be extremely diff
Effectus [21]
<span>In certain cases, when the Swen executable is removed or renamed by an anti virus program without stopping to fix the registry, it then will become impossible to run any executable files on the machine. This happens because windows will be unable to find the file that is associated with any executables on it's hard drive.</span>
7 0
3 years ago
What are the names of the components (each shown with a leader and a line) of a circuit shown in the diagram?
Goryan [66]

Answer:

The name of the components of the given labelled circuit is:

The box like figure in the given image is the battery source from where the current drawn into the circuit.

A string connecting positive terminal of battery to the bulb is an electric wire through which current flows in the circuit.

A bubble like object in the circuit is a bulb which lights up when current moves through the circuit.

A component connected to the negative terminal of batter source is a switch.

Then open circuit is an open as the key of the switch is open.

8 0
2 years ago
You've formatted the first paragraph of a document. What button can you use to apply the formatting from the first paragraph to
Nata [24]
I think the answer is B. format painter 

3 0
3 years ago
Other questions:
  • The use of digital technology and the Internet to execute the major business processes in the enterprise is called
    11·1 answer
  • Tricia listed her assets and liabilities. Credit Card Bill Car Loan Bonds Piano Bank Account Bicycle Which are Tricia’s liabilit
    8·2 answers
  • Why are listening and speaking part of the Common Core and ELD Standards? Why is this particularly important for our ELD student
    14·1 answer
  • Which of the following can potentially be changed when implementing an interface?
    13·1 answer
  • The array s of ints contain integers each of which is between 1 and 1000 (inclusive). write code that stores in the variable ord
    9·1 answer
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • How would you define the rule of thirds?
    11·1 answer
  • Grace is the editor of her school newspaper. Which feature of a word processing program would she use to make her changes visibl
    7·2 answers
  • You are comparing cryptographic solutions to implement at your organization. Which two items should you focus on when you are ev
    12·1 answer
  • When you pass a double variable to a method, the method receives ______.a) a copy of the memory addressb) the reference of the v
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!