def day01_02(): """Run part 2 of Day 1's code""" path = "./input/01/input.txt" product = product_of_3_sumto2020(file_to_array(path)) print(f"0102: Product of three numbers summing to 2020: {product}")
def test_01(self): testlist = file_to_array('tests/input_day01.txt') result = gt_previous(testlist) expected = 7 assert expected == result
def day01_02(): PATH = "./input/day01.txt" inputlist=file_to_array(PATH) result=gt_previous_smoothed(inputlist) print(f"0102: {result} sums larger than the previous sum.")
def test_02(self): testlist = file_to_array('tests/input_day01.txt') result = gt_previous_smoothed(testlist) expected = 5 assert expected == result
def day01_01(): PATH = "./input/day01.txt" inputlist=file_to_array(PATH) result=gt_previous(inputlist) print(f"0101: {result} Measurements larger than the previous measurement.")