- くだすれPython(超初心者用) その27©2ch.net
778 :デフォルトの名無しさん[sage]:2015/10/31(土) 22:00:10.15 ID:UVsvdy88 - python超初心者です。
python 3.4.3 shellで >>>class Prism: def _init_(self,width,height,depth): self.width=width self.height=height self.depth=depth def content(self): return self.width*self.height*self.depth(インデントはしてあります) >>>p1=Prism(10,20,30) TypeError:object() takes no parameters となりました。みんなのpython第3刷です。 超初心者ですいません。回答お願いします。
|