Explain what is slot and what are the most commonly used slot options?
Answer / chaitanya
Slots are nothing but variables that stores data or fields. A slot description has the form, where each option is a keyword followed by name, expression and other options.
The most commonly used slot options are:
• :accessor function-name
• :initform expression
• :initarg symbol
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain what is LISP constants?
Explain why matching variable is important in Prolog? What is the method to match variables?
How many types of variables are available in lisp? a) 1 b) 2 c) 3 d) 4
Explain what is slot and what are the most commonly used slot options?
Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?
Which forms can be constructed with the same primitives that manipulate lisp expressions? a) Lisp b) Macro c) Procedure d) Defun
. 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 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
Explain what is the difference between bagof/3 and setof/3 predicate in Prolog?
Which primitive removes all but the last element from the list? a) Last b) First c) Remove d) Revoke
How data types are categorized in LISP?
Explain what is setq is used for in LISP?
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)