For each day (numbered 1..25), the first notebook cell defines a puzzle
object:
puzzle = advent.puzzle(day=1)
The puzzle input string is automatically read into the attribute puzzle.input
.
This input string is unique to each Advent participant.
For each of the two puzzle parts, a function (e.g. process1
) takes an input string and returns a string or integer answer.
Using calls like the following, we time the execution of each function and verify the answers:
puzzle.verify(part=1, func=process1)
puzzle.verify(part=2, func=process2)