Created
January 29, 2021 10:57
-
-
Save switowski/395ccb5b3e636bf81a5ddd7eb1010bc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [7]: %xmode | |
Exception reporting mode: Verbose | |
In [8]: solve() | |
--------------------------------------------------------------------------- | |
IndexError Traceback (most recent call last) | |
<ipython-input-10-6f300b4f5987> in <module> | |
----> 1 solve() | |
global solve = <function solve at 0x109312b80> | |
~/workspace/iac/solver.py in solve() | |
25 def solve(): | |
26 values = read_input() | |
---> 27 part1 = solve1(values) | |
part1 = undefined | |
global solve1 = <function solve1 at 0x109f363a0> | |
values = [['..##.......', ..., '.#..#...#.#']] | |
28 print(f"Part 1: {part1}") | |
29 print(f"Part 2: {solve2(values, part1)}") | |
~/workspace/iac/solver.py in solve1(values=[['..##.......', ..., '.#..#...#.#']]) | |
14 | |
15 def solve1(values: list) -> int: | |
---> 16 return count_trees(values, 3, 1) | |
global count_trees = <function count_trees at 0x109f364c0> | |
values = [['..##.......', ..., '.#..#...#.#']] | |
17 | |
18 def solve2(values: list, sol_part1: int) -> int: | |
... and so on | |
IndexError: list index out of range |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment