Explain what is List structures in Prolog?
Answer / chaitanya
A Prolog list is referred as an ordered sequence of elements of arbitrary length. Here the elements are variables, constant, structures, including other lists.
| Is This Answer Correct ? | 0 Yes | 0 No |
. What is the output of the given statement? * (defstruct employee (length-of-service 0) (payment ‘salary)) * (setf employee-example (make-employee)) * (employee-length-of-service employee-example) a) T b) NIL c) 0 d) Error
What is the output of the following statement? * (+ 3.14 2.71) a) 3.14 b) 2.71 c) 5.84 d) 5.85
What is the output of the following statement? * ( first (rest (first ‘((a b) (c d))))) a) a b) b c) c d) d
What is the output of the following statement? * (defun both-ends-with-special ()(setf whole-list (cons (first whole-list) (last whole-list)))) * (setf whole-list ‘(monday tuesday wednesday thursday friday)) * (both-ends-with-special) a) Monday b) Friday c) Wednesday d) Both a & b
What are the variables that are bound and that have values assigned to them? a) Data b) Variable c) Parameters d) None of the mentioned
Explain what is the property list in LISP?
Which symbol holds the first element and also an index in LISP? a) Nail b) Tail c) Initial d) All of the mentioned
Demonstrate with an example how you can code in LISP?
What is the other name of boxes in LISP? a) Cons cells b) Conses c) Both a & b d) None of the mentioned
Mention how many types of variables available is LISP? Explain what are the variables that are bound, and that have values assigned to them?
Why in prolog it is said that Program and Data are the same thing?
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
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)