mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
fixed whitespaces
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user