Created
August 24, 2018 09:04
-
-
Save nemesifier/41149dc17983584f13152554bb624081 to your computer and use it in GitHub Desktop.
Prints out monthly interest in the specified range
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 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