candh / truth-table-generator

generates a truth table from a boolean expression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

challenge from last semester from a professor. i couldn't solve it then because i wasn't aware of the power of the stack.

works okay... run with -a to sort the operands alphabetically

  • supports brackets also

things that you shouldn't do

  • run with brackets that are not parentheses

operators are

"=" BiConditional, ">" Implies, "+" Or, "&" And, "~" Not

all tests runs are confirmed by this http://turner.faculty.swau.edu/mathematics/materialslibrary/truth/

outputscreen

About

generates a truth table from a boolean expression


Languages

Language:Python 100.0%