fixed whitespaces

This commit is contained in:
D-T-666
2020-10-17 22:55:04 +04:00
parent 954b47fecd
commit e416d597fa
2 changed files with 3 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ def gcdFunc(maxVal=20):
x, y = a, b x, y = a, b
while(y): while(y):
x, y = y, x % y x, y = y, x % y
problem = f"GCD of {a} and {b} = " problem = f"GCD of {a} and {b} ="
solution = str(x) solution = str(x)
return problem, solution return problem, solution
@@ -128,7 +128,7 @@ def lcmFunc(maxVal=20):
while(y): while(y):
x, y = y, x % y x, y = y, x % y
d = c // x d = c // x
problem = f"LCM of {a} and {b} = " problem = f"LCM of {a} and {b} ="
solution = str(d) solution = str(d)
return problem, solution return problem, solution

View File

@@ -77,4 +77,4 @@ def test_gcdFunc(maxVal):
split_arr = problem.split(' ') split_arr = problem.split(' ')
mult = int(split_arr[2])*int(split_arr[4]) mult = int(split_arr[2])*int(split_arr[4])
assert mult if mult != pow(int(split_arr[2]), 2) else int( assert mult if mult != pow(int(split_arr[2]), 2) else int(
split_arr[2]) == int(solution) split_arr[2]) == int(solution)