Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 619 Bytes
class BankAccount () :
def __init__(self, balance=0, deposit=0, withdrawal=0, accumulate_interest=0) :
self.balance = balance
self.deposit = balance + deposit
self.withdrawal = balance - withdrawal
self.accumulate_interest = balance + (balance*accumulate_interest)
basic_account = BankAccount()
basic_account.deposit(600)
print("Basic account has ${}".format(basic_account.balance))
basic_account.withdraw(17)
print("Basic account has ${}".format(basic_account.balance))
basic_account.accumulate_interest()
print("Basic account has ${}".format(basic_account.balance))
print()
#### I am very lost.