One idea
A runnable tool is easier to trust when the work is inside functions, not floating at the top of the file.
Keep one file for reusable logic and one file for the command people run.
Why this matters
In hackathon repos, reviewers often open your code before they run it. If everything is one long script, it is hard to see what reads input, what processes data, and what writes output.
Functions give names to those steps. Modules let you reuse those functions later when you add JSON files, APIs, or tests.