Update is_even.py (#8028)

This commit is contained in:
Roberto Garcia 2022-12-14 22:10:09 -06:00 committed by GitHub
parent 40f165b789
commit af8d520922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ def is_even(number: int) -> bool:
from the above examples we can observe that
for all the odd integers there is always 1 set bit at the end
also, 1 in binary can be represented as 001, 00001, or 0000001
so for any odd integer n => n&1 is always equlas 1 else the integer is even
so for any odd integer n => n&1 is always equals 1 else the integer is even
>>> is_even(1)
False