From 90f5ccf6c8332f6f7d3d3667b145cffde6633cbc Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 14 Nov 2019 08:40:39 -0600 Subject: [PATCH] day 8 minor day 9 setup --- 2018/day-8/python/main.py | 4 ++-- 2018/day-9/input | 0 2018/day-9/python/main.py | 0 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 2018/day-9/input create mode 100644 2018/day-9/python/main.py diff --git a/2018/day-8/python/main.py b/2018/day-8/python/main.py index edc7a24..20c4697 100644 --- a/2018/day-8/python/main.py +++ b/2018/day-8/python/main.py @@ -14,7 +14,7 @@ class Node(object): def run(self): curadd = 0 - for i in range(self.childnum): + for _ in range(self.childnum): self.children.append( Node(self.input, self.root + 2 + curadd) ) @@ -36,7 +36,7 @@ class Node(object): def __repr__(self): return f'Node at index {self.root}' - # Part 2 + # Part 2 Solution Function def getValue(self): if self.childnum == 0: return sum(self.entries) diff --git a/2018/day-9/input b/2018/day-9/input new file mode 100644 index 0000000..e69de29 diff --git a/2018/day-9/python/main.py b/2018/day-9/python/main.py new file mode 100644 index 0000000..e69de29