logo

Crowdly

Browser

Add to Chrome

Consider the following Prolog program: test(X,Y) :-      ( X > 0 -> Y = posi...

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

Consider the following Prolog program:

test(X,Y) :-

     ( X > 0 -> Y = positive ; Y = nonpositive ).

What value(s), if any, will be returned for Y by the following query?

?- test(3,Y).

100%
0%
0%
0%
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