What is the output of the given statement?
* (defstruct person (sex nil) (personality ‘nice))
* (setf person-instance-1 (make-person))
* (setf person-instance-2 (make-person :sex ‘female))
* (person-p ‘(this is a list — not a person instance))
a) Female
b) Nice
c) T
d) Nil
What is the output of the given statement? * (defclass article() ((title :accessor article-title :initarg :title) (author :accessor article-author :initarg :author))) * (defclass computer-article (article) ()) * (defclass business-article (article) ()) * (defclass political-article (article) ()) * (setf articles (list (make-instance ‘business-article :title “Memory Prices down”))) a) Business article b) Political article c) Business article
What is the output of the following statement? * (setf thing ‘point r 1) * (case thing (circle (*pi r r))(sphere (* 4 pi r r))) a) 1 b) 12.56637 c) NIL d) T
Which process helps to build large and complicated programs in LISP? a) Macros b) Procedure abstraction c) Defun d) None
Which is present in the writer procedure for arrays in LISP? a) Setf b) Aref c) Fref d) Both a & b
Explain List of programming languages for artificial intelligence?
Mention why you have to use “is” instead of “=” in Prolog when it comes to applying calculation logic?
Which enables storage in procedurally indexed places in LISP? a) Defstruct b) Object c) Structure d) None of the mentioned
What is the output of the following statement? * ‘(first (first (rest (rest ((a b) (c d) (e f)))))) a) a b) b c) ab d) (FIRST (FIRST (REST (REST ((A B) (C D) (E F))))))
What is the output of the given statement? * (setf pressure -3) * (when-plusp pressure (print ‘alarm)); a) T b) Nil c) Alarm d) None of the mentioned
Which require sophisticated precedence compputation? a) Superclass b) Multiple Superclass c) Subclass d) None of the mentioned
What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) * (person-personality person-instance-2) a) Female b) Nice c) Person d) Both a & b
Explain why matching variable is important in Prolog? What is the method to match variables?