In LISP, the function returns t if is even and nil otherwise: A. (evenp ) B. (even ) C. (numeven ) D. (numnevenp ) E. None of the above

(evenp <integer>)
(even <integer>)
(numeven <integer>)
(numnevenp <integer>) E. None of the above

The correct answer is A. (evenp ).

The function (evenp ) returns t if the integer is even and nil otherwise.

The function (even ) returns t if the integer is even and nil otherwise, but it also returns t if the integer is zero.

The function (numeven ) returns the number of even numbers less than or equal to the integer.

The function (numnevenp ) returns the number of odd numbers less than or equal to the integer.

Here is an example of how to use the function (evenp ):

(evenp 2) => t
(evenp 3) => nil
(evenp 0) => t

Exit mobile version