2021 Day 02

This commit is contained in:
Akumatic
2021-12-02 14:30:01 +01:00
parent 9224ada9ba
commit 813cecc174
6 changed files with 1120 additions and 1 deletions

14
2021/02/test_code.py Normal file
View File

@ -0,0 +1,14 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2021 Akumatic
from code import part1, part2
def test():
vals = [("forward", 5), ("down", 5), ("forward", 8), ("up", 3), ("down", 8), ("forward", 2)]
assert part1(vals) == 150
print("Passed Part 1")
assert part2(vals) == 900
print("Passed Part 2")
if __name__ == "__main__":
test()