Created
June 13, 2014 15:54
-
-
Save mbains/04173714fcb28163b253 to your computer and use it in GitHub Desktop.
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
class Credit(): | |
charges = [] | |
history = {} | |
def __init__(value): | |
self.charges.append(value) | |
def balance(): | |
print sum(self.charges) | |
def charge(n): | |
self.history[time.time()] = n | |
def estimate_interest(n): | |
"""estimate interest charges if payment activity on the account""" | |
total = self.balance() | |
print total - n % 17.5% | |
def make_payment(n): | |
values = self.charges | |
del values[n] | |
print values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment