We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09b2984 commit 23d97b5Copy full SHA for 23d97b5
1 file changed
maths/is_even.py
@@ -2,6 +2,14 @@ def is_even(n: int) -> bool:
2
"""
3
Check whether a number is even.
4
5
+ An even number is an integer divisible by 2.
6
+ Reference: https://en.wikipedia.org/wiki/Parity_(mathematics)
7
+
8
+ >>> is_even(10)
9
+ True
10
+ >>> is_even(7)
11
+ False
12
13
:param n: Integer number
14
:return: True if even, False otherwise
15
0 commit comments