|
@ -74,7 +74,7 @@ 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, '') |
|
|
if constant == "": |
|
|
if constant == "": |
|
|
constant = constant + "+0" |
|
|
|
|
|
|
|
|
constant += "+0" |
|
|
constant = constant.lstrip("+") |
|
|
constant = constant.lstrip("+") |
|
|
return [constant, f"{coefficient}x"] |
|
|
return [constant, f"{coefficient}x"] |
|
|
|
|
|
|
|
|