|
@ -56,4 +56,4 @@ def simplify_easy_math_function(type, function): |
|
|
def extract_constant(function): |
|
|
def extract_constant(function): |
|
|
coefficient, constant = function.split('x', 1) if 'x' in function else (function, '') |
|
|
coefficient, constant = function.split('x', 1) if 'x' in function else (function, '') |
|
|
constant = constant.lstrip('+') |
|
|
constant = constant.lstrip('+') |
|
|
return [constant, f"{coefficient}x"] |
|
|
|
|
|
|
|
|
return [constant, f"{coefficient}x"] |