Evaluation of formula G =((p→q) ^p)→q
and the output display the result of true false'
conclusion if it is a valid, invalid or inconsistent..
thank you for any response its a big help to my study
her's my unfinished code
import sys
p=[True,True,False,False]
q=[True,False,True,False]
a = []
def p_AND_q(p,q):
print p,"\t", q, "\t", p and q
def AND(p,q):
sys.stdout.write("p \t q");
print "\t p and q"
print "------------------------"
j=0
while(j < len(q)):
p_AND_q(p[j],q[j])
j = j+1
print "Therefore formula is invalid"