Skip to content

Instantly share code, notes, and snippets.

@toby-p
Created October 25, 2018 20:34
Show Gist options
  • Select an option

  • Save toby-p/b6f72ce75e191daa0c0a4be6da819ec6 to your computer and use it in GitHub Desktop.

Select an option

Save toby-p/b6f72ce75e191daa0c0a4be6da819ec6 to your computer and use it in GitHub Desktop.
Compound interest
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