# is_even function

Test whether a whole number is even.

## How to write it

### is_even(n)

**n**

A whole number. Takes a whole number.

## Examples

- $\displaystyle \operatorname{is\_even}(4) = \operatorname{true}$

  `is_even(4)`

  In the solver, `is_even(4)` gives `true`.

  [Open in the solver](https://hilberon.com/?q=is_even%284%29)

## Related functions

- [is_integer](https://hilberon.com/library/is_integer)

  Test whether a value is a whole number.
- [implies](https://hilberon.com/library/implies)

  True unless the first condition is true and the second false.
- [is_number](https://hilberon.com/library/is_number)

  Test whether a value is a number.
- [greater_equal](https://hilberon.com/library/greater_equal)

  True when the first value is at least the second: the function form of >=.
- [is_numeric](https://hilberon.com/library/is_numeric)

  Test whether a value has a numeric value, such as pi.
- [greater](https://hilberon.com/library/greater)

  True when the first value is greater than the second: the function form of >.

---
Source: https://hilberon.com/library/is_even
