How Variables Are Used In Prolog?

DWQA QuestionsCategory: PrologHow Variables Are Used In Prolog?
Editor Staff asked 11 months ago

How Variables Are Used In Prolog?

1 Answers
Editor Staff answered 11 months ago

Here is an Example:
Suppose we want to ask, “What course does ROBIN teach”?,then we can write it in prolog as
” Is there a course,x,that ROBIN teaches? “
Here,
here x stands for an object that the questioner does not know about yet,so to answer the prolog has to find the value of x.If we know the value of variable then it is known as BOUND, if we don’t know then known as UNBOUND.