Skip to content

Instantly share code, notes, and snippets.

@nemesifier
Created August 24, 2018 09:04
Show Gist options
  • Save nemesifier/41149dc17983584f13152554bb624081 to your computer and use it in GitHub Desktop.
Save nemesifier/41149dc17983584f13152554bb624081 to your computer and use it in GitHub Desktop.
Prints out monthly interest in the specified range
def find_monthly_interest(minimum, maximum, interest, find_round=False):
interest = interest / 100.0
counter = minimum
while counter <= maximum:
amount = counter
counter += 1
monthly = amount * interest / 12
if find_round and amount * interest % 12.0 != 0:
continue
print('{0} yelds {1} per month'.format(amount, monthly))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment