[Tutor] PLEASE I NEED HELP URGENTLY

Alan Gauld alan.gauld at btinternet.com
Sat Jan 9 20:07:58 EST 2016


On 09/01/16 19:54, precious akams via Tutor wrote:
> PLEASE I NEED A LITTLE HELP .
> I can figure out what Iam missing in this project
> 

Please post in plain text otherwise the code formatting
gets messed up.

> class BankAccount:
> def_init_(self, initial_amount):
> self.balance=initial_amount

init should have two underscores on each side.
ie
__init__
not
_init_

> TypeError('this constructor takes no arguments'

I'm not sure how you are running your code but thats
not the usual error message format. If posting again
please include details of your OS, python version and
any IDE you are using.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list