Skip to content

AltesHaus/BasicTruthTableSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Logical Expression Truth Table Generator

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.

Features

  • Supports logical expressions with variables: A, B, C, and D.
  • Supports logical operators: and, or, and not.
  • Dynamically creates a truth table based on the input expression.
  • Simple error handling for invalid logical statements.

Prerequisites

Ensure you have the following installed:

  • Python 3.x

Installation

  1. Clone the repository to your local machine or download the main.py file.

    git clone https://github.com/AltesHaus/BasicTruthTableSolver.git
  2. Navigate to the project directory:

    cd BasicTruthTableSolver

How to Use

  1. Run the main.py script by entering the following command:

    python main.py
  2. Input your logical statement when prompted. The application will recognize the variables A, B, C, and D, and print a truth table based on the expression.

Example:

If you input the logical statement: A and (B or not C)

About

Just having some fun and saving some time for discr. mathematics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages