logo

Crowdly

Browser

Add to Chrome

Consider the following Prolog program: teaches(chris, history). teaches(ch...

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

Consider the following Prolog program:

teaches(chris, history).

teaches(chris, english).

teaches(chris, drama).

teaches(maria, physics).              

studies(alice, english).

studies(jake, english).

studies(emily, drama).

studies(alex, physics).

What is an expected output of the query

below, which uses a cut (!)?

?- teaches(chris, Course), !, studies(Student, Course).

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