From 13ae320ccca48454046feb4ddb04952055fde65a Mon Sep 17 00:00:00 2001 From: fd7794 Date: Tue, 6 Feb 2024 11:42:23 +0100 Subject: [PATCH] added cast to int for simplify_exponential_function --- src/main/py/read_math_function.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/py/read_math_function.py b/src/main/py/read_math_function.py index 5fabab3..add7387 100644 --- a/src/main/py/read_math_function.py +++ b/src/main/py/read_math_function.py @@ -78,4 +78,6 @@ def simplify_exponential_function(type, function): return False if 'x' not in function: return "Der Ausdruck muss die Variable 'x' enthalten." - coefficient, exponent = function.split('x^') \ No newline at end of file + coefficient, exponent = function.split('x^') + coefficient = int(coefficient) if coefficient else 1 + exponent = int(exponent) \ No newline at end of file