Here is my Code:
class Account:
def __init__(self, owner, balance, deposit, withdraw):
self.owner=owner
self.balance=balance
self.deposit=deposit
self.withdraw=withdraw
def __str__(self):
return f'Account Owner{self.owner} Account Balance {self.balance}'
def Deposit(self,deposit):
self.balance+=self.deposit
print ('Deposit Accepted')
def Withdraw(self,withdraw):
self.balance-=withdraw
while self.withdraw>=self.balance:
print ('Funds Unavailable')
else:
print ('Withdrawal Accepted')
acct1 = Account('Jose',100,0,0)
acct1.deposit(50)
Below is the error:
TypeError Traceback (most recent call last)
<ipython-input-56-a52dcc476376> in <module>
----> 1 acct1.withdraw(75)
TypeError: 'int' object is not callable
0 Answer(s)