mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
adb0b64452
commit
95fcc5f838
@ -21,6 +21,7 @@ def commutative_law_and(a: bool, b: bool) -> bool:
|
|||||||
"""
|
"""
|
||||||
return a and b
|
return a and b
|
||||||
|
|
||||||
|
|
||||||
def commutative_law_or(a: bool, b: bool) -> bool:
|
def commutative_law_or(a: bool, b: bool) -> bool:
|
||||||
"""
|
"""
|
||||||
Implement the commutative law for OR: A OR B = B OR A.
|
Implement the commutative law for OR: A OR B = B OR A.
|
||||||
@ -44,6 +45,8 @@ def commutative_law_or(a: bool, b: bool) -> bool:
|
|||||||
"""
|
"""
|
||||||
return a or b
|
return a or b
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import doctest
|
import doctest
|
||||||
|
|
||||||
doctest.testmod()
|
doctest.testmod()
|
||||||
|
Loading…
Reference in New Issue
Block a user