Question: 5 . 9 Populating Truth Tables with Boolean Functions IMPORTANT: You will need to use the drop down above the code, below, to select
Populating Truth Tables with Boolean Functions
IMPORTANT: You will need to use the drop down above the code, below, to select PApy and paste your PA code in that file in order for your PA code to work.
For this assignment you will be provided with a function callffpq whose input is a function and its two arguments, and returns the value of the function applied to the arguments. You are also given a "main" to test your code.
Your task is to implement three functions: evalttff and equivalenttttt and istautologytt
The function evalttff will, given a two argument Boolean function f as input one of the functions you created in PApy return the truth table for f Use the function makettinsn function you implemented in PApy to create a list with the inputs for the truth table, and then use callf to append the truth value for f to each row. For example, evalttfiff should return:
False False, TrueFalse True, FalseTrue False, FalseTrue True, True
The function equivalenttttt should return True if tt and tt are logically equivalent and False otherwise. For example, equivalentevalttfPAimplies evalttfPAnqIMPnp
should return True.
The function istautologytt should return True if the tt parameter has a True value as the output for all possible tt inputs, otherwise it should return false.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
