Question: Let 1 represent true and 0 represent false. The function ExclusiveDisjunction ( ) , whose incomplete code is given below, computes p q: def ExclusiveDisjunction

Let 1 represent true and 0 represent false. The function ExclusiveDisjunction(), whose incomplete code is given below, computes pq:
def ExclusiveDisjunction(p,q):
#FIX ME#
return 1
else:
return 0
What should the line of code which contains the expression #FIX ME# be replaced with in order to complete the code?
Question 6 options:
if p != q:
if p == q:
if p ==0 and q ==0:
if p ==1 and q ==1:

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!