menu COMPSCI 2120/9642/DIGIHUM 2220 1.0 documentation

Activity 1

_images/calculator.jpg

What you need to do

Build a function to compute compound interest given a starting amount(P), an annual interest rate (r), the number of compoundings per year (n) and the total number of years (t). Your function should return A, which is the value of the principle plus the interest after compounding. Use this formula:

_images/compound_interest.png

Call your function with the following test values: P = 1000, r = 0.02, n=1, t=5. Print the resulting output.

What to submit (in zipped folder)

  1. Your python file (activity1.py)

  2. A text file with your output (output.txt)