Travis CI: Add pytest --doctest-modules maths (#1020)

* Travis CI: Add pytest --doctest-modules maths

* Update lucas_series.py

* Update lucas_series.py
This commit is contained in:
Christian Clauss
2019-07-21 08:16:28 +02:00
committed by Anup Kumar Panwar
parent b35f5d971b
commit 93fdc9f2a1
5 changed files with 34 additions and 28 deletions

View File

@ -17,11 +17,12 @@ def binary_exponentiation(a, n):
return b * b
try:
BASE = int(input('Enter Base : '))
POWER = int(input("Enter Power : "))
except ValueError:
print("Invalid literal for integer")
if __name__ == "__main__":
try:
BASE = int(input("Enter Base : ").strip())
POWER = int(input("Enter Power : ").strip())
except ValueError:
print("Invalid literal for integer")
RESULT = binary_exponentiation(BASE, POWER)
print("{}^({}) : {}".format(BASE, POWER, RESULT))
RESULT = binary_exponentiation(BASE, POWER)
print("{}^({}) : {}".format(BASE, POWER, RESULT))