Answer:
A and D
Step-by-step explanation:
result is a boolean that is true only if val1 is true and val2 is false. Option (A) works because it proceeds if val1 and not val2. Options B and C do not work, but option D does. In option D it says if val1 is true, and val2 is false, only then will result be true, otherwise it is false. Therefore the answers are (A) and (D).