fix LaTeX formatting in arithmetic rendering, simplify fraction variable mistake

This commit is contained in:
Xevion
2020-12-12 18:25:38 -06:00
parent 0b2b2c85b0
commit 02fc049eb8

View File

@@ -31,7 +31,7 @@ def multiplication():
b = random.randint(2, 26 - a) b = random.randint(2, 26 - a)
return { return {
'type': inspect.stack()[0][3], 'type': inspect.stack()[0][3],
'question': f'{a} x {b}', 'question': f'{a}\\times {b}',
'answer': a * b 'answer': a * b
} }
@@ -41,7 +41,7 @@ def division():
b = random.randint(2, 26 - a) b = random.randint(2, 26 - a)
return { return {
'type': inspect.stack()[0][3], 'type': inspect.stack()[0][3],
'question': f'{a * b} ÷ {b}', 'question': f'{a * b}\\div {b}',
'answer': a 'answer': a
} }
@@ -59,7 +59,7 @@ def simplify_fraction():
return { return {
'type': inspect.stack()[0][3], 'type': inspect.stack()[0][3],
'question': f'Simplify. \\frac{{{c}}}{{{d}}}', 'question': f'Simplify. \\frac{{{c}}}{{{d}}}',
'answer': f'{c}/{d}' 'answer': f'{a}/{b}'
} }