How Variables Are Used In Prolog?

Category: PrologHow Variables Are Used In Prolog?
Editor">Editor Staff asked 2 years ago

How Variables Are Used In Prolog?

1 Answers
Editor">Editor Staff answered 2 years 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.