Solve problems from the Tchisla app in Python. Code is in the tchisla.py script below. Parameters for the problem being solved can be modified in the if __name__ == "__main__" block at the bottom of tchisla.py.
TODO:
- Avoid creating strings for expressions until the values have been validated
- This could involve passing the operator and child expressions to
Solver._validateinstead of the resulting expression, calculting the value using theOperator.operationattribute orOperator.__call__method inSolver._validate, and then only creating the resulting expression (including creating its string using theOperator.get_stringattribute) if the value is valid
- This could involve passing the operator and child expressions to
- Change
target,nandn_count_targetto command line arguments - Add more comments
- Save dictionaries to file so that the