Day 4: Scratchcards [AOC2023 Python] @0xdf
Day 4: Scratchcards [AOC2023 Python]  @0xdf
Uploaded December 2023 | Updated November 2026, 3 hours ago
For Advent of Code 2023 Day4, I get a series of lines, each of which represents a scratchcard. Each card has a series of winning numbers and a series of numbers for that card. In part 1, I need to calcaulate a score for each card based on the number of winners and sum them up. In part 2, I get copies of later cards based on the number of winners on each card, so I need to keep a list of the number of each card I have and total that up at the end.

Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/4

☕ Buy Me A Coffee: buymeacoffee.com/0xdf

#adventofcode #python

[00:00] Part 1 description
[01:16] Input
[02:05] score_card function
[05:09] Fixing bug with 0 winners
[06:31] Solving part 1
[07:09] Part 2 description
[08:29] Initial solution
[11:49] Identify score issue
[12:25] Fixing score issue
[16:00] Solving part 2
[16:10] Summary
Day 4: Scratchcards [AOC2023 Python]New: HackTheBox Guided Mode!Python Script to Read Files on Encoding [HackTheBox]Brute Forcing a Web Pin - Frosty Keypad [Sans Holiday Hack 2024]Printing Department [AOC2025 Day 4]PowerShell Challenge [Sans Holiday Hack 2024]Scanning UDP with nmapReading (Almost) A Million QRCodes [Hackvent 2022 - Day 16]Day 1: Trebuchet?! [AOC2023 Python]Monkey Market [Day 22 - Advent of Code 2024 - Python]Unsafe Escape with Express JS / mysqljsMalicious Lnk and JavaScript Analysis
0xdf |

Day 4: Scratchcards [AOC2023 Python]

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER