From af8ae4e1e4fe90b85ce5928d8653abf203dcad1d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 23:17:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- maths/binary_exponentiation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maths/binary_exponentiation.py b/maths/binary_exponentiation.py index c5bb79897..7eeca8926 100644 --- a/maths/binary_exponentiation.py +++ b/maths/binary_exponentiation.py @@ -5,12 +5,12 @@ def binary_exponentiation(a: int, n: int) -> int: - ''' + """ >>> binary_exponentiation(3, 5) 243 >>> binary_exponentiation(10, 3) 1000 - ''' + """ if n == 0: return 1 @@ -24,8 +24,9 @@ def binary_exponentiation(a: int, n: int) -> int: if __name__ == "__main__": import doctest + doctest.testmod() - + try: BASE = int(input("Enter Base : ").strip()) POWER = int(input("Enter Power : ").strip())