Skip to content

Instantly share code, notes, and snippets.

@mbains
Created June 13, 2014 15:54
Show Gist options
  • Save mbains/04173714fcb28163b253 to your computer and use it in GitHub Desktop.
Save mbains/04173714fcb28163b253 to your computer and use it in GitHub Desktop.
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