Skip to content

Commit

Permalink
added support for "->" & "<->" in truth table
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipul-Cariappa committed Jan 3, 2023
1 parent e1888f2 commit 60098d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,8 @@ def __str__(self):
z = Variable("z")


def truth_table_generator(expression_string):
expression = eval(expression_string)
def truth_table_generator(expression_string: str):
expression = eval(expression_string.replace("<->", "%").replace("->", "/"))
return expression.generate_table_md(), expression.table


Expand Down

0 comments on commit 60098d0

Please sign in to comment.