Explain what is the difference between bagof/3 and setof/3 predicate in Prolog?
Answer / chaitanya
Setof/3 is similar to bagof/3 and the difference between is that bagof/3 leaves all repeated solutions while setof/3 removes them.
| Is This Answer Correct ? | 0 Yes | 0 No |
Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned
What is the programming structure for LISP?
What is the output of the given statement in LISP? * (setf l1 (list ‘a ‘b ‘c)) * (setf l2 (list ‘a ‘b)) * (setf l1 l2) a) A B b) A B C c) B C d) None of the mentioned
What is the output of the following statement? * (defun make (title author) (list (list ‘title title) (list ‘author author))) * (setf book (make ‘(Common Lisp) ‘(Guy steele))) a) Common Lisp b) Guy steele c) Make d) ((TITLE (COMMON LISP)) (AUTHOR (GUY STEELE)))
What is the output of the given statement? * (defstruct circle (radius 0)) * (defun area (figure) (cond ((circle-p figure) (* pi (expt (circle-radius figure) 2))))) * (setf circle (make-circle :radius 11)) * (area circle) a) 44 b) 380 c) 382 d) 380.132
What is the output of the given statement? * (evenp (* 10 8 6 4 2)) a) T b) F c) NIL d) All of the mentioned
What is the output of the following statement? * ( first (rest (first ‘((a b) (c d))))) a) a b) b c) c d) d
Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned
Explain List of programming languages for artificial intelligence?
What will happen if the value of all the test-forms are nil? a) Nothing b) COND form is nil c) Both a & b d) None of the mentioned
Explain why PROLOG language is stated as a procedural language?
Which process helps to build a large and complicated programs in LISP? a) Abstraction b) Mapping c) Data abstraction d) None of the mentioned
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)