Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please have explanations beside every code. Question 3a: Compound Interest with Regular Deposits (2 points) If p is the bank's interest rate in decimal (e.g.,

Please have explanations beside every code.image text in transcribedimage text in transcribed

Question 3a: Compound Interest with Regular Deposits (2 points) If p is the bank's interest rate in decimal (e.g., 0.05 means 5%.) per year, an initial amount a will grow after n years to: a(1 + p)" Write a Python function growth(a, p, n) that returns the future value (that is, the total amount of funds), starting with amount a , rate p , for n years. You can assume that all parameters are non-negative. (Your solution does not need to check for that condition, it should simply assume it.) The input p represents the interest rate as a floating point number. In [ ]: def growth(a, p, n): # Your Code Here! return s In [ ]: growth (340000,0.0314,25) == 736473.447868039 In [ ]: growth (10,0.01,10) == 11.046221254112044 In [ ]: growth (65,100,3) == 66969565 Question 3b (1 point) What is the difference in savings if you invest $2000 for 20 years at 2% vs. 1% interest? Set ans3 to the difference in savings (as a positive number, rounded to two decimal places) in the cell below. NOTE: you should call the function you wrote in the previous section! In [ ]: def question3b(): # your work here! return ans3

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

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

How would you rank the innovation objectives for the project? LOP98

Answered: 1 week ago

Question

Understand links between the university business model and HRM.

Answered: 1 week ago