[Tutor] PLEASE I NEED HELP URGENTLY
Whom Isac
wombingsac at gmail.com
Thu Jan 14 07:06:16 EST 2016
@precious Akams.
I don't know if you have tried to look for any resources e.g. python
directory to help you with this small syntax error. And I don't see
any relevance information with your callback error message with your
code. How did you able to run it?? I have not been reading my mails in
a while so I just honestly did not wanted upset you with anymore
words.
I felt you should learn to take a little bit precaution while coding.
Here is my Solution which I don't think you are using to pass or to
have cheated your homework:
class BankAccount(object):
def __init__(self, initial_amount):
self.balance=initial_amount
def deposit (self, amount):
self.balance+=amount
def withdraw (self, amount):
if self.balance>=amount:
return ('invalid transaction')
else:
#What are trying to do eg.
self.balance=self.balance-amount
return self.balance
pass
MinimumBalanceAcc=BankAccount #---> This created an instances
#To create a subclass
class MinimumBalanceAccount(BankAccount):
#You don't need to call the init function if you are just trying
to use Bank account functions
# add any other additional methods below:
#eg.
def show_balance(self):
print(str(self.balance))
On Thu, Jan 14, 2016 at 6:52 AM, Tim Golden <mail at timgolden.me.uk> wrote:
>
> On 13/01/2016 20:51, Tim Golden wrote:
>>
>> Speaking as the list moderator in question over there: if I might
>> moderate Mark's well-known zeal...
>
>
> (Absolutely no pun intended!)
>
>
> TJG
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list