def xor(x,y): #x and y are formal parameters ''' computes xor of two Boolean variables, x and y ''' return (x and (not y)) or ((not x) and y)