Explain what is prolog programming language? What is it based on?
Answer / chaitanya
Prolog is designed for Artificial Intelligence, and it deals with the declarative and logical aspects. Prolog is a logic programming and is based on three attributes- Facts, Rules of Inference and Questions. Facts are the known truths, rules determine how new information can be inferred from these facts, and questions search for answers according to the facts and rules.
Is This Answer Correct ? | 0 Yes | 0 No |
What is a data type in which expressions are stored in places identified by integer indexes in LISP? a) Structure b) List c) Array d) None of the mentioned
What is the output of the following statement? * (defun book-author (book) (second book)) * (setf book-example-1 ‘((Artificial Intelligence) (Patrick) (Technical AI))) * (book-author book-example-1) a) Artificial Intelligence b) Patrick c) Technical AI d) None of the mentioned
Which keyword is used to define the method? a) Defun b) Destruct c) Demake d) Defmethod
Explain what is Local Variables?
Which is used to construct new lists by linking the right pointers? a) Links b) List c) Variables d) Right pointers
Which is used to build the lisp procedures?
Which keyword is used to define macro procedures in LISP? a) Defun b) Demacro c) Defmacro d) None of the mentioned
Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned
Explain what is slot and what are the most commonly used slot options?
. What is the output of the given statement? * (defstruct employee (length-of-service 0) (payment ‘salary)) * (setf employee-example (make-employee)) * (employee-length-of-service employee-example) a) T b) NIL c) 0 d) Error
What is the output of the following statement? * (setf meals ‘(breakfast lunch tea dinner)) * (first meals) a) Breakfast b) Lunch c) Tea d) Dinner
Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?