even more lint fixes

This commit is contained in:
lukew3
2020-12-17 19:20:09 -05:00
parent 6958cda6e9
commit 3c4b7feaf3
2 changed files with 3 additions and 4 deletions

View File

@@ -15,8 +15,8 @@ def multiplyIntToMatrix22(maxMatrixVal=10, maxRes=100, style='raw'):
d1 = d * constant d1 = d * constant
if style == 'latex': if style == 'latex':
problem = "\\(" + str(constant) + "\\cdot\\begin{bmatrix}" + str(a) + "&" + str(b) + "\\\\" + str(c) + "&" + str(d) + "\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}\\)" solution = "\\(\\begin{bmatrix}" + str(a1) + "&" + str(b1) + "\\\\" + str(c1) + "&" + str(d1) + "\\end{bmatrix}\\)"
else: else:
problem = f"{constant} * [[{a}, {b}], [{c}, {d}]] = " problem = f"{constant} * [[{a}, {b}], [{c}, {d}]] = "
solution = f"[[{a1},{b1}],[{c1},{d1}]]" solution = f"[[{a1},{b1}],[{c1},{d1}]]"

View File

@@ -10,7 +10,7 @@ def additionFunc(maxSum=99, maxAddend=50, style='raw'):
c = a + b c = a + b
if style == 'latex': if style == 'latex':
problem = "\(" + str(a) + '+' + str(b) + "\)" problem = "\\(" + str(a) + '+' + str(b) + "\\)"
solution = str(c) solution = str(c)
return problem, solution return problem, solution
else: else:
@@ -19,5 +19,4 @@ def additionFunc(maxSum=99, maxAddend=50, style='raw'):
return problem, solution return problem, solution
addition = Generator("Addition", 0, "a+b=", "c", additionFunc) addition = Generator("Addition", 0, "a+b=", "c", additionFunc)