Changed the JSON generator to generate JSON that includes the correct answer for the expression.

This commit is contained in:
2020-04-13 00:05:17 -05:00
parent 1265f8ac3e
commit d1231b062f
6 changed files with 43 additions and 20 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
class Expression:
expression = ""
correct_answer = 0
variables = []
def __init__(self, expression_string, variables):
def __init__(self, expression_string, variables, correct):
self.expression = expression_string
self.variables = variables
self.correct_answer = correct
class Variable:
VARIABLE_TYPES = {