This script finds all solutions to the 24 Game. In this game, the player must use all 4 integers provided, along with any standard operation (addition, subtraction, multiplication, division) to yield 24. More info at https://www.24game.com/t-about-howtoplay.aspx .
This script is generalized to handle any target number (not just 24), with any number of integers entered - the user is prompted to enable this functionality at the start of execution.
This was tested with Python 3.9.7. No guarantees for earlier versions. Run the main file to start the solver.
No special packages were used.
This project was inspired by a math game that a few of my middle school teachers used to have us play. Find more information on the official game here: https://www.24game.com/ .