It is certain that Mary went to the bedroom. It is likely that John took the apple. It is unlikely that Lily is green. There is a better than even chance that if 'Mary went to the bedroom' or 'John took the apple' or both then Jessica is a mouse. It is impossible that if 'John took the apple and Lily is green' then Greg is gray. Chances are about even that if 'Mary went to the bedroom' or 'Lily is green' or both then Bernhard is a swan.
It is highly unlikely that either 'Lily is green' or 'John took the apple' but not both.
There is a better than even chance that either 'Lily is green' or 'John took the apple' but not both.
It is highly unlikely that either 'Lily is green' or 'John took the apple' but not both.

  and(A,B) :- A,B.
  or(A,B) :- A;B.
  nand(A,B) :- not(and(A,B)).
  nor(A,B) :- not(or(A,B)).
  xor(A,B) :- or(A,B), nand(A,B).

  %hop0
  1.0::factA.
  0.7::factB.
  0.2::factC.
  %hop1
  0.6::factX:-or(factA,factB).
  0.0::factY:-and(factB,factC).
  0.5::factZ:-or(factA,factC).

  %hop2
  conclusion:-xor(factC,factB).

  query(conclusion).
  
Either 'Lily is green' or 'John took the apple' but not both.