質問編集履歴

2

classが抜けていました

2021/09/08 04:19

投稿

HGK
HGK

スコア29

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,9 @@
12
12
 
13
13
  ```Python
14
14
 
15
+ class Agent:
16
+
15
- def like(self):
17
+  def like(self):
16
18
 
17
19
  for i in range(n):
18
20
 
@@ -38,6 +40,8 @@
38
40
 
39
41
  ```Python
40
42
 
43
+ class Updete:
44
+
41
45
  def update_like(self,agents):
42
46
 
43
47
  l = (self.lp agents)*(self.lp agents)*(agents.lp self)

1

変数を括弧でくくりました

2021/09/08 04:19

投稿

HGK
HGK

スコア29

test CHANGED
File without changes
test CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
  def update_like(self,agents):
42
42
 
43
- l = self.lp agents*self.lp agents*agents.lp self
43
+ l = (self.lp agents)*(self.lp agents)*(agents.lp self)
44
44
 
45
45
    return l
46
46