Question: Task1. Complete the truth table for the following compound proposition Propositional Statement: Either Harry finds the locket and Ron breaks his wand or Fred will

Task1. Complete the truth table for the following compound proposition

Propositional Statement: Either Harry finds the locket and Ron breaks his wand or Fred will not open a joke shop

Atomic propositions

h: Harry finds the locket

r: Ron breaks his wand

f: Fred opens a joke shop

The compound proposition: (hr)f

def compound_propositions(h, r, f):

return h, r, f # change this line 

Task2. Complete the truth table for implication

- use this logical equivalence: pqpq

def implication(p, q):

return p, q # change this line

Task3. Complete the truth table for biconditional

- use this logical equivalence: pq(pq)(pq)

def biconditional(p, q):

return p, q # change this line

Code:

def compound_propositions(h, r, f): return h, r, f # change this line def implication(p, q): return p, q # change this line def biconditional(p, q): return p, q # change this line

print(' compound proposition') print('h','r','f','(hr)f') for h in [0, 1]: for r in [0, 1]: for f in [0, 1]: print(h, r, f, compound_propositions(h, r, f))

print(' implication') print('p','q','pq') for p in [0, 1]: for q in [0, 1]: print(p, q, implication(p, q))

print(' biconditional') print('p','q','pq') for p in [0, 1]: for q in [0, 1]: print(p, q, biconditional(p, q))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!