i cant seem to figure out the error

Jason Friedman jsf80238 at gmail.com
Sun Apr 3 13:37:09 EDT 2016


>   def deposit(self, amount):
>     self.amount=amount
>     self.balance += amount
>     return self.balance
>
>
>   def withdraw(self, amount):
>     self.amount=amount
>     if(amount > self.balance):
>       return ("Amount greater than available balance.")
>     else:
>   self.balance -= amount
>     return self.balance

Also, this line is not needed in the deposit and withdraw methods:

self.amount=amount



More information about the Python-list mailing list