mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
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:

committed by
Anup Kumar Panwar

parent
b35f5d971b
commit
93fdc9f2a1
@ -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))
|
||||
|
Reference in New Issue
Block a user