Difficulty: Easy
Correct Answer: (+ 3 2)
Explanation:
Introduction / Context:
LISP (LISt Processing) uses prefix (Polish) notation and parenthesized lists to represent expressions. Operators precede their operands, and evaluation proceeds by applying the first element (a function or operator) to the remaining elements (arguments). The question tests recognition of this canonical syntax for a simple arithmetic operation.
Given Data / Assumptions:
Concept / Approach:
In LISP, an addition is written with the plus symbol as a function followed by its arguments inside a list. Thus the correct expression is an s-expression containing the operator and operands: (+ 3 2). This is evaluated by the interpreter to produce the number 5. The same pattern generalizes to any number of operands, e.g., (+ 1 2 3).
Step-by-Step Solution:
Verification / Alternative check:
A quick test in any Common Lisp or Scheme environment returns 5 for (+ 3 2), validating the syntax and semantics.
Why Other Options Are Wrong:
‘‘3 + 2’’ and ‘‘3 + 2 =’’: Infix notation; not LISP list form.
‘‘3 add 2’’: Not valid LISP syntax for addition.
None of the above: Incorrect because (+ 3 2) is valid.
Common Pitfalls:
Forgetting parentheses around the list; writing infix out of habit from other languages.
Final Answer:
(+ 3 2)
Discussion & Comments