This Python application generates a truth table for any logical expression using Boolean variables (A, B, C, D). The user inputs the logical expression, and the truth table for that expression is displayed.
- Supports logical expressions with variables:
A,B,C, andD. - Supports logical operators:
and,or, andnot. - Dynamically creates a truth table based on the input expression.
- Simple error handling for invalid logical statements.
Ensure you have the following installed:
- Python 3.x
-
Clone the repository to your local machine or download the
main.pyfile.git clone https://github.com/AltesHaus/BasicTruthTableSolver.git
-
Navigate to the project directory:
cd BasicTruthTableSolver
-
Run the
main.pyscript by entering the following command:python main.py
-
Input your logical statement when prompted. The application will recognize the variables
A,B,C, andD, and print a truth table based on the expression.
If you input the logical statement: A and (B or not C)