logo

Crowdly

Browser

Add to Chrome

Consider the following Prolog program: p(a). p(b). q...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Consider the following Prolog program:

p(a).

p(b).

q(a).

q(b).

r(X,Y) :- p(X), !, q(Y).

What answers are produced by the following query?

 

?- r(X,Y).

0%
0%
0%
100%
More questions like this

Want instant access to all verified answers on moodle.royalholloway.ac.uk?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome