Demonstrate with an example how you can code in LISP?



Demonstrate with an example how you can code in LISP?..

Answer / chaitanya

Almost everything in LISP is a function, even the mathematical operators.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

 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

1 Answers  


 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

1 Answers  


 What is the output of the following statement? *(setf thing ‘sphere r 1) * (cond ((eq thing ‘circle) (* pi r r)) ((* 4 pi r r))) a) 10.566 b) 11.5683 c) 12.56637 d) 13

1 Answers  


Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?

1 Answers  


Which is used to construct new lists by linking the right pointers? a) Links b) List c) Variables d) Right pointers

1 Answers  


Which makes it possible to define generic functions? a) Lisp b) CLOS c) Class d) Object-Oriented programming

1 Answers  


Which creates reader procedures for getting things out of an instance fields? a) Structure in LISP b) Defstruct c) Class d) Object

1 Answers  


Explain what is LISP? Give an example of some of the popular applications built in LISP?

1 Answers  


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

1 Answers  


Explain with an example what is “Setof” predicate in Prolog?

1 Answers  


 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

1 Answers  


 What is the programming structure for LISP?

1 Answers  


Categories
  • AI Algorithms Interview Questions AI Algorithms (74)
  • AI Natural Language Processing Interview Questions AI Natural Language Processing (96)
  • AI Knowledge Representation Reasoning Interview Questions AI Knowledge Representation Reasoning (12)
  • AI Robotics Interview Questions AI Robotics (183)
  • AI Computer Vision Interview Questions AI Computer Vision (13)
  • AI Neural Networks Interview Questions AI Neural Networks (66)
  • AI Fuzzy Logic Interview Questions AI Fuzzy Logic (31)
  • AI Games Interview Questions AI Games (8)
  • AI Languages Interview Questions AI Languages (141)
  • AI Tools Interview Questions AI Tools (11)
  • AI Machine Learning Interview Questions AI Machine Learning (659)
  • Data Science Interview Questions Data Science (671)
  • Data Mining Interview Questions Data Mining (120)
  • AI Deep Learning Interview Questions AI Deep Learning (111)
  • Generative AI Interview Questions Generative AI (153)
  • AI Frameworks Libraries Interview Questions AI Frameworks Libraries (197)
  • AI Ethics Safety Interview Questions AI Ethics Safety (100)
  • AI Applications Interview Questions AI Applications (427)
  • AI General Interview Questions AI General (197)
  • AI AllOther Interview Questions AI AllOther (6)