I need to create a truth table (as a list of lists) given an expression (string). I was given a function to extract the variables. I need to complete this method recursively.
An expression could be "a or b", "(a and b) or c", etc.
I am very new to python, so I am not familiar with a lot of the built in functions.
Some of the things I'm confused on is how to get the operators from the expression?
How to evaluate the expression at every possible value for each variable?
This function is just very confusing to me in general. Any help is appreciated.
An expression could be "a or b", "(a and b) or c", etc.
I am very new to python, so I am not familiar with a lot of the built in functions.
Some of the things I'm confused on is how to get the operators from the expression?
How to evaluate the expression at every possible value for each variable?
This function is just very confusing to me in general. Any help is appreciated.