here is my code so far:
1, How do I write a code that save and update the transaction made that when I close the program and run it again , the accounts will show the last transaction that was made before the programme ended.
class Account(object):
def __init__(self):
self.balance = 0
def deposit(self, amount):
if (amount < 0):
return 'Please deposit an amount greater than 0'
self.balance += amount
print ('Amount deposited {}'.format(amount))
return 'SUCCESS'
def withdraw(self, amount):
if (amount < 0):
return 'Please withdraw an amount greater than 0'
if (amount > self.balance):
return