What is the output of the following statement?
* (defun (input-list) (if (endp input-list) nil (cons ( (first input-list)) ( (rest input-list)))))
a) Procedure
b) Transforming
c) Input
d) Error
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
Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned
Explain what is LISP constants?
Which makes it possible to define generic functions? a) Lisp b) CLOS c) Class d) Object-Oriented programming
Explain what is Local Variables?
Which is used to represent the prompt in lisp? a) # b) $ c) & d) *
Which is the primitive that creates new structure types in LISP? a) Defnum b) Deftype c) Defstruct d) None of the mentioned
Explain what is LISP? Give an example of some of the popular applications built in LISP?
What is the programming structure for LISP?
What is the output of the given statement? * (setf toss ‘(heads tails tails tails heads tails)) * (delete ‘heads toss) * toss a) Heads tails b) Heads tails tails tails tails c) Heads d) None of the mentioned
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
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)) a) Person :sex female :personality nice b) Person :sex c) Sex:Female d) None of the mentioned