Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This question has a PART A and a PART B. (45 points) The idea of compound interest is that interest is added back to the

This question has a PART A and a PART B.

image text in transcribedimage text in transcribed
(45 points) The idea of compound interest is that interest is added back to the principal amount (compounded), thus earning interest during the next compounding period. The total value of an investment (including the principal) can be determined by using the following formula: A = p x (1 + an\". In this formula, 10 is the 0 amount of the principal, r is the interest rate, n is the number of times interest rate is compounded per year, and t is the number of years. Suppose that the interest rate is xed for the term of your investment and that it is determined by the initial amount of the principal. according to the following table: Interest rate (Per annum) Less than $100.00 $100.0 or more but less than $10,000.00 $10,000.0 or more but less than $1,000,000.00 $1,000,000.00 or more For this problem, you are not allowed to use any loops or lists. Part a. (15 of 45 points) Write a function invest(info) that takes a size three tuple that has parameters 1), n, and t and returns the total value of an investment (including the principal) after 1 years. Part b. (20 of 45 points) Now assume, you saved your function in a le called calc.py. In another le, write a short program which asks the user for the amount to invest and the number of years and then reports the expected outcome (rounded to the nearest cent) of investing by considering three options: interest is compounded once a year, 4 times a year, or monthly. Your program should be printing either: (a) In any case, you will not earn over 850. (b) You can earn between Quin) and on. Where (min) and men stand for the minimum and the maximum amount of interest that can be earned. Write your program to call the function invest () saved in calc .py and use the value returned to make the remaining decisions. Beiow are two runs of the program (the user prompt is shown with ' => \")1 Enter the amount to Invest => 110 Enter the nunber of years => 5 In any case, you will not earn over $50. Enter the amount to invest -> 101000.5 Enter the number or years -> 3 You can earn between 6182.04 and 6240.17

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions