Skip to content
This repository was archived by the owner on May 7, 2023. It is now read-only.

Files

Latest commit

 

History

History
22 lines (18 loc) · 391 Bytes

is-even.md

File metadata and controls

22 lines (18 loc) · 391 Bytes
title type tags unlisted cover dateModified
Number is even
snippet
math
true
interior-3
2021-01-04 12:47:04 +0200

Checks if the given number is even.

  • Check whether a number is odd or even using the modulo (%) operator.
  • Return True if the number is even, False if the number is odd.
def is_even(num):
  return num % 2 == 0
is_even(3) # False