Skip to content

Instantly share code, notes, and snippets.

@bgits
Created June 19, 2014 16:21
Show Gist options
  • Save bgits/f344fc0f4dccdd11b3f4 to your computer and use it in GitHub Desktop.
Save bgits/f344fc0f4dccdd11b3f4 to your computer and use it in GitHub Desktop.
principal = float(input("Enter the lump sum investment: "))
apr = float(input("Enter the perodic interest rate: "))
years = int(input("Enter the number of periods: "))
x = years
for i in range(years):
principal = principal * (1+apr)
print('The value in %s periods is: %s' % (years,principal))
@bgits
Copy link
Author

bgits commented Jun 19, 2014

Calculates the future value of a lump sum compounded over a specified period

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment