Exemple #1
0
def main():
    """Print out the answers to Advent of Code 2018 day 2."""
    part_1 = calculate_checksum(aoc_02_input.get_input())
    print(f"Advent of Code 2018 02 part 1: {part_1}")

    part_2 = get_common_letters(*get_prototype_boxes(aoc_02_input.get_input()))
    print(f"Advent of Code 2018 02 part 2: {part_2}")
Exemple #2
0
def main():
    """ main()

        Main function that use the input from Advent of Code and print the
        answer to the problems for day one.
    """
    aoc_input = aoc_02_input.get_input()

    task_1_answer = solve_task1(aoc_input)
    task_2_answer = solve_task2(aoc_input)

    print('Part 1: {}'.format(task_1_answer))
    print('Part 2: {}'.format(task_2_answer))
Exemple #3
0
def main():
    """ main()

        Main function that use the input from Advent of Code and print the
        answer to the problems for day one.
    """
    aoc_input = aoc_02_input.get_input()

    password = calculate_password(aoc_input, 1)
    password2 = calculate_password(aoc_input, 2)

    print('Part 1: {}'.format(password))
    print('Part 2: {}'.format(password2))
Exemple #4
0
def main():
    input_rows = aoc_02_input.get_input()

    print(calculate_total(input_rows))