Explain why matching variable is important in Prolog? What is the method to match variables?
Answer / chaitanya
In Prolog, in order to process the elements of a list, we have to match them to variables. The method for doing is
We get the head by matching it to a variable
By calling a predicate with the variable, it processes the head
Until you get an empty list repeat the above steps
| Is This Answer Correct ? | 2 Yes | 0 No |
What is the output of the given statement? * (defclass article() ((title :accessor article-title :initarg :title) (author :accessor article-author :initarg :author))) a) Article b) c) d) None of the mentioned
What is the output of the following statement? * (+ 3.14 2.71) a) 3.14 b) 2.71 c) 5.84 d) 5.85
Which keyword is used to define macro procedures in LISP? a) Defun b) Demacro c) Defmacro d) None of the mentioned
What is the output of the given statement? * (setf pressure 3) * (when-plusp pressure (print ‘alarm)); a) Alarm b) Alarm Alarm c) 1 d) Nil
Which has a template that calls for particularly peculiar argument evaluation? a) COND b) Consequent c) Trigger d) Sphere
Explain what is Local Variables?
Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?
What is the process of arranging procedures into layers? a) Procedure b) Abstraction c) Abstraction layers d) Procedure abstraction
What is a symbol thought of as a name for a place to store value? a) Data b) Variable c) Parameters d) None of the mentioned
Explain List of programming languages for artificial intelligence?
Which keyword is used to define the method? a) Defun b) Destruct c) Demake d) Defmethod
Which is a string of boxes linked by arrow like pointers in LISP? a) Lisp b) List c) Variables d) Pointers
AI Algorithms (74)
AI Natural Language Processing (96)
AI Knowledge Representation Reasoning (12)
AI Robotics (183)
AI Computer Vision (13)
AI Neural Networks (66)
AI Fuzzy Logic (31)
AI Games (8)
AI Languages (141)
AI Tools (11)
AI Machine Learning (659)
Data Science (671)
Data Mining (120)
AI Deep Learning (111)
Generative AI (153)
AI Frameworks Libraries (197)
AI Ethics Safety (100)
AI Applications (427)
AI General (197)
AI AllOther (6)