What is the output of the given statement?
* (defstruct triangle (base 0) (altitude 0))
* (defun area (figure) (cond ((triangle-p figure) (* 1/2 (triangle-base figure) (triangle-altitude figure)))))
* (setf triangle (make-triangle :base 2 :altitude 3))
* (area triangle)
a) Triangle
b) 7
c) 6
d) 10
Which is used to represent the prompt in lisp? a) # b) $ c) & d) *
What is the output of the following statement? * ( first (rest (first ‘((a b) (c d))))) a) a b) b c) c d) d
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 following statement? * (defun make (title author) (list (list ‘title title) (list ‘author author))) * (setf book (make ‘(Common Lisp) ‘(Guy steele))) * (defun book-author-writer (book author) (cons (list ‘author author) book)) a) Book b) Book-author c) Book-author-writer d) None of the mentioned
. What is the output of the given statement? * (setf high 98 temperature 102) * (when (> temperature high) (setf high temperature) ‘new-record) * high a) 98 b) 102 c) new d) Error
Mention what are the three functions required by LISP?
What is partly embedded in the knowledge of your programming for manipulating applications? a) Programming cliches b) Procedures c) Abstraction d) Data
How data types are categorized in LISP?
In “cuts” what is the Parent goal in Prolog?
Mention why you have to use “is” instead of “=” in Prolog when it comes to applying calculation logic?
What is the output of the following statement? * (first ‘( p h w)) a) P b) H c) W d) phw
What is the output of the given statement? * (setf day-or-date ‘monday) * (if (symbolp day-or-date) ‘day ‘date) a) Monday b) Day c) Date d) None of the mentioned