EvenQ

EvenQ[expr]

gives True if expr is an even integer, and False otherwise.

Details

  • EvenQ[expr] returns False unless expr is manifestly an even integer (i.e. has head Integer, and is even).

Examples

open allclose all

Basic Examples  (2)

Test whether 8 is even:

In[1]:=
Click for copyable input
Out[1]=

EvenQ gives False for non-numeric expressions:

In[1]:=
Click for copyable input
Out[1]=

Applications  (1)

Properties & Relations  (3)

Possible Issues  (1)

See Also

IntegerQ  OddQ  TrueQ  Divisible

Tutorials

Introduced in 1988
(1.0)