質問編集履歴
1
unitVolumeに入れていた引数 uintを取り、selfのみとした。アウトプットされたエラーコードを書き換えた。
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,18 +22,12 @@
|
|
22
22
|
self.w=self.d =self.h=equalSides
|
23
23
|
self.unit = unit
|
24
24
|
|
25
|
-
def unitVolume(self
|
25
|
+
def unitVolume(self):
|
26
26
|
return str(self.volume)+self.unit
|
27
27
|
b=Cube(10)
|
28
28
|
b.unitVolume()
|
29
29
|
|
30
|
-
#
|
30
|
+
# エラーコード
|
31
|
-
#Traceback (most recent call last)
|
32
|
-
#Input In [27], in <cell line: 2>()
|
33
|
-
# 1 b=Cube(10)
|
34
|
-
#----> 2 b.unitVolume()
|
35
|
-
|
36
|
-
|
31
|
+
'<bound method Cuboid.volume of <__main__.Cube object at 0x7fbab8b74e80>>cm'
|
37
|
-
|
38
32
|
|
39
33
|
```
|