Question: iii.Write a Python function definition following the instructions that are provided below. Important note: in order to raise a quantity to a power, the Python

iii.Write a Python function definition following the instructions that are provided below.
Important note: in order to raise a quantity to a power, the Python operator ** can be used. So, for example, 2**3 is evaluated as .
Write a single Python function that implements the algorithm you wrote for part (c)(ii). Your function must be a translation of your algorithm from part (c)(ii), otherwise no marks will be awarded.
The function should have three arguments: one for the future savings, future_savings, one for the annual interest rate, annual_interest_rate, and a third for the number of years, nb_years, that the money will grow.
The function should have one return value for the recommended amount needed to deposit, estimated_deposit, which is a double (rounded to two decimal places).
Save your function in a file called Q4_OUCU.py, where OUCU is your OU computer username, e.g. abc123.
When you have completed your work on this part:
paste the function definition from your code file into your solution document as text (with indentation preserved) using an evenly spaced font such Courier New or Consolas
include the code file with your function in your TMA zip file.
iv.Test the function by calling it with the arguments 20000,0.05 and 8 in your Python program. Paste the function call and the result as text into your solution document.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!