The prolog language

5 important questions on The prolog language

How do we exit prolog?

Type halt.

What is the negation operator \+ used for in prolog?

\+ can be used in front of an atom in a query to flip between yes and no

Negation in queries: Which one will succeed? Female(gina) or \+ male(gina)

+\ male (gina)
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

When are two atoms with distinct variables are said to unify?

If there is a substitution for the variables that makes the atoms identical For example: likes (john, Y) and likes (john, pizza)

How is a predicate written?

As a constant

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo