day 8 minor day 9 setup

This commit is contained in:
2019-11-14 08:40:39 -06:00
parent bacdb406c1
commit 90f5ccf6c8
3 changed files with 2 additions and 2 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ class Node(object):
def run(self): def run(self):
curadd = 0 curadd = 0
for i in range(self.childnum): for _ in range(self.childnum):
self.children.append( self.children.append(
Node(self.input, self.root + 2 + curadd) Node(self.input, self.root + 2 + curadd)
) )
@@ -36,7 +36,7 @@ class Node(object):
def __repr__(self): def __repr__(self):
return f'Node at index {self.root}' return f'Node at index {self.root}'
# Part 2 # Part 2 Solution Function
def getValue(self): def getValue(self):
if self.childnum == 0: if self.childnum == 0:
return sum(self.entries) return sum(self.entries)
View File
View File