Re: [Tutor] Object takes no parameters

2017-08-16 Thread Alan Gauld via Tutor
On 17/08/17 01:08, Howard Lawrence wrote: > class Human: > def _init_(self, n, o) > self.name = n > self.occupation = o > > > tom = Human('tom cruise', 'actor') > > Traceback most recent call last > File "c:\users\shaun\python\python35\human_class.py"line 16 in module >

[Tutor] Object takes no parameters

2017-08-16 Thread Howard Lawrence
class Human: def _init_(self, n, o) self.name = n self.occupation = o def do_work(self): if self.occupation== 'tennis player': print(self.name, 'plays tennis') elif self.occupation == 'actor': print(self.name, 'shoots film')