set up day 01

This commit is contained in:
Heiko Ludwig 2023-12-01 19:48:57 +01:00
parent 3f21aab6d7
commit e268519cc5
4 changed files with 1033 additions and 0 deletions

1000
day_01/input.txt Normal file

File diff suppressed because it is too large Load diff

16
day_01/program.py Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env python3
# https://adventofcode.com/2023/day/1
def get_lines(filename: str) -> list:
with open(filename, "r") as file:
return [line.strip() for line in file.readlines()]
def main():
lines = get_lines("test-input.txt")
# lines = get_lines("input.txt")
if __name__ == '__main__':
main()

4
day_01/test-input.txt Normal file
View file

@ -0,0 +1,4 @@
1abc2
pqr3stu8vwx
a1b2c3d4e5f
treb7uchet

13
day_01/test_program.py Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env python3
import program
import unittest
class TestThing(unittest.TestCase):
def setUp(self):
pass
if __name__ == '__main__':
unittest.main()