A cryptarithmetic equation solver using brute force algorithm implemented in python
- Python3 installed. Please refer to the internet for the installation ;)
- Clone this repository to your local directory by navigating to your local directory by typing this line in the command line:
git clone "https://github.com/Rexy-Gamaliel/Cryptarithmetic"
- Configure the equation you want to solve in a .txt file with the following format:
Things to be noted:
WORDA WORDB WORDC ------ RESULT
- Operands are to be inputted above the dash row, while a single result is to be inputted below it
- You may input arbitrary number (> 1) of operands above the dash row
- The number of dashes in the dash row is irrelevant
- The equation would be intepreted as summation of the operands resulting in result
- The input file is case-sensitive
- The default file to be loaded to the program is
test1.txt
. If you wish to change the file to be loaded, you have to edit this linewith open("../test/test1.txt") as file:
in the program
- Go to
/src
folder - Run the python program