Created
October 25, 2018 20:34
-
-
Save toby-p/b6f72ce75e191daa0c0a4be6da819ec6 to your computer and use it in GitHub Desktop.
Compound interest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def compound(initial, percent, years): | |
| if years>0: | |
| initial+=(initial*percent) | |
| years-=1 | |
| return compound(initial, percent, years) | |
| else: | |
| return initial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment