From 3c4b7feaf3efe6a0984d08fc92bf78b621f5c429 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Thu, 17 Dec 2020 19:20:09 -0500 Subject: [PATCH] even more lint fixes --- mathgenerator/funcs/algebra/multiply_int_to_22_matrix.py | 4 ++-- mathgenerator/funcs/basic_math/addition.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mathgenerator/funcs/algebra/multiply_int_to_22_matrix.py b/mathgenerator/funcs/algebra/multiply_int_to_22_matrix.py index dab2d94..8b81d41 100644 --- a/mathgenerator/funcs/algebra/multiply_int_to_22_matrix.py +++ b/mathgenerator/funcs/algebra/multiply_int_to_22_matrix.py @@ -15,8 +15,8 @@ def multiplyIntToMatrix22(maxMatrixVal=10, maxRes=100, style='raw'): d1 = d * constant if style == 'latex': - problem = "\\(" + str(constant) + "\\cdot\\begin{bmatrix}" + str(a) + "&" + str(b) + "\\\\" + str(c) + "&" + str(d) + "\end{bmatrix}=\\)" - solution = "\\(\\begin{bmatrix}" + str(a1) + "&" + str(b1) + "\\\\" + str(c1) + "&" + str(d1) + "\end{bmatrix}\\)" + problem = "\\(" + str(constant) + "\\cdot\\begin{bmatrix}" + str(a) + "&" + str(b) + "\\\\" + str(c) + "&" + str(d) + "\\end{bmatrix}=\\)" + solution = "\\(\\begin{bmatrix}" + str(a1) + "&" + str(b1) + "\\\\" + str(c1) + "&" + str(d1) + "\\end{bmatrix}\\)" else: problem = f"{constant} * [[{a}, {b}], [{c}, {d}]] = " solution = f"[[{a1},{b1}],[{c1},{d1}]]" diff --git a/mathgenerator/funcs/basic_math/addition.py b/mathgenerator/funcs/basic_math/addition.py index 0cd7f61..bd26e8f 100644 --- a/mathgenerator/funcs/basic_math/addition.py +++ b/mathgenerator/funcs/basic_math/addition.py @@ -10,7 +10,7 @@ def additionFunc(maxSum=99, maxAddend=50, style='raw'): c = a + b if style == 'latex': - problem = "\(" + str(a) + '+' + str(b) + "\)" + problem = "\\(" + str(a) + '+' + str(b) + "\\)" solution = str(c) return problem, solution else: @@ -19,5 +19,4 @@ def additionFunc(maxSum=99, maxAddend=50, style='raw'): return problem, solution - addition = Generator("Addition", 0, "a+b=", "c", additionFunc)