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
Oduvanchick [21]
3 years ago
11

python Write a function that computes a future investment value at a given interest rate for a specified number of years. The fu

ture investment is determined using the formula in Programming Exercise 2.19 in Chapter 2 Programming Exercise from the Book.
Computers and Technology
1 answer:
Svetlanka [38]3 years ago
4 0

Answer:

def future_investment_value(investment, monthly_interest_rate, years):

  print("Years\tFuture Value")

  print("- - - - - - - - - - -")

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

      future_value = investment * ((1 + monthly_interest_rate) ** (12 * i))

      print(i, "\t\t", format(future_value, ".2f"))

investment = float(input("Enter the invesment amount: "))

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

year = int(input("Enter the year: "))

future_investment_value(investment, interest/1200, year)

Explanation:

Inside the function:

- In the for loop that iterates through the years, calculate the future value using the formula and print the results

Then:

- Ask the user for the investment, annual interest rate, and year

- Call the function with the given inputs

You might be interested in
You are adding more features to a linear regression model and hope they will improve your model. If you add an important feature
Ludmilka [50]

Answer:

The answer is "Option A".

Explanation:

Add extra functionality, otherwise, it increases the R-square value, which is defined in the following points:      

  • To incorporate essential elements, R-square is explicitly promoted.
  • It Increases the R-square value, which is an additional feature.
  • It removes the features, which provide the value of the reduce R-square.
  • After incorporating the additional features is used as the model, which is R-square, which is never reduced.
8 0
3 years ago
Is Filmora 9 or Final Cut Pro Better for personal use?
padilas [110]
Final Cut Pro is better for personal use
3 0
3 years ago
Sketch a 3-view orthographic projection of the object shown
vichka [17]

Answer:

Explanation:

/|_/]

6 0
3 years ago
2.Consider the following algorithm and A is a 2-D array of size ???? × ????: int any_equal(int n, int A[][]) { int i, j, k, m; f
Elis [28]

Answer:

(a) What is the best case time complexity of the algorithm (assuming n > 1)?

Answer: O(1)

(b) What is the worst case time complexity of the algorithm?

Answer: O(n^4)

Explanation:

(a) In the best case, the if condition will be true, the program will only run once and return so complexity of the algorithm is O(1) .

(b) In the worst case, the program will run n^4 times so complexity of the algorithm is O(n^4).

5 0
4 years ago
On a network, a(n) ________ helps prevent data packets from colliding with each other.
KATRIN_1 [288]
On a network, a(n) Switches helps prevents data packets from colliding with each other.
4 0
3 years ago
Other questions:
  • 1. Which of the following might be a problem taken on by environment engineers?
    8·1 answer
  • Given the following code:
    9·1 answer
  • What must be done to translate a posttest loop expressed in the form
    9·1 answer
  • What technique creates different hashes for the same password? ccna routing protocols final answers?
    7·1 answer
  • What are small applications that can be accessed over the web?
    7·2 answers
  • Why is it important to use the binomial nomenclature system?
    6·1 answer
  • In 2-3 sentences, explain to another student why shortcuts are beneficial. Include details about shortcuts that you have used.
    10·2 answers
  • Dell Computers is a nationally recognized manufacturer of computers for the small business and home markets. If Dell were to ord
    9·1 answer
  • Why is time zone an important factor affecting when communicating
    14·1 answer
  • What does a good résumé help you do?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!