diff --git a/mathgenerator/funcs/basic_math/complex_division.py b/mathgenerator/funcs/basic_math/complex_division.py index 68504a0..e836f50 100644 --- a/mathgenerator/funcs/basic_math/complex_division.py +++ b/mathgenerator/funcs/basic_math/complex_division.py @@ -6,7 +6,7 @@ def complexDivisionFunc(maxRes=99, maxDivid=99, style='raw'): b = random.randint(1, min(maxRes, maxDivid)) c = a / b c = round(c, 2) - + if style == 'latex': problem = "\\(" + str(a) + "\\div" + str(b) + "=\\)" solution = "\\(" + str(c) + "\\)" diff --git a/mathgenerator/funcs/basic_math/divide_fractions.py b/mathgenerator/funcs/basic_math/divide_fractions.py index 9fa5178..6db3c87 100644 --- a/mathgenerator/funcs/basic_math/divide_fractions.py +++ b/mathgenerator/funcs/basic_math/divide_fractions.py @@ -22,8 +22,8 @@ def divideFractionsFunc(maxVal=10, style='raw'): tmp_d = b * c gcd = calculate_gcd(tmp_n, tmp_d) - sol_numerator = tmp_n//gcd - sol_denominator = tmp_d//gcd + sol_numerator = tmp_n // gcd + sol_denominator = tmp_d // gcd x = f"{sol_numerator}/{sol_denominator}" if (tmp_d == 1 or tmp_d == gcd): diff --git a/mathgenerator/funcs/basic_math/division.py b/mathgenerator/funcs/basic_math/division.py index df16f0a..b98001d 100644 --- a/mathgenerator/funcs/basic_math/division.py +++ b/mathgenerator/funcs/basic_math/division.py @@ -14,7 +14,7 @@ def divisionToIntFunc(maxA=25, maxB=25, style='raw'): solution = "\\(" + str(quotient) + "\\)" else: problem = f"{divisor}/{dividend}=" - solution = str(quotient) + solution = str(quotient) return problem, solution diff --git a/mathgenerator/funcs/basic_math/multiplication.py b/mathgenerator/funcs/basic_math/multiplication.py index ae1cb6f..d999d38 100644 --- a/mathgenerator/funcs/basic_math/multiplication.py +++ b/mathgenerator/funcs/basic_math/multiplication.py @@ -10,7 +10,7 @@ def multiplicationFunc(maxRes=99, maxMulti=99, style='raw'): c = a * b if style == 'latex': - problem = "\\(" + str(a) + "\cdot" + str(b) + "=\\)" + problem = "\\(" + str(a) + "\\cdot" + str(b) + "=\\)" solution = "\\(" + str(c) + "\\)" else: problem = str(a) + "*" + str(b) + "=" diff --git a/mathgenerator/funcs/basic_math/square.py b/mathgenerator/funcs/basic_math/square.py index 7b0230e..3b8c5bb 100644 --- a/mathgenerator/funcs/basic_math/square.py +++ b/mathgenerator/funcs/basic_math/square.py @@ -4,7 +4,7 @@ from .__init__ import * def squareFunc(maxSquareNum=20, style='raw'): a = random.randint(1, maxSquareNum) b = a * a - + if style == 'latex': problem = "\\(" + str(a) + "^{2}=\\)" solution = "\\(" + str(b) + "\\)"