From 6a1601c322413b0321fe2e801063dc935848592f Mon Sep 17 00:00:00 2001 From: fd7794 Date: Tue, 6 Feb 2024 11:50:28 +0100 Subject: [PATCH] added result declaration for new_exponent!=1&&0 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 21ff654..9763275 100644 --- a/src/main/py/read_math_function.py +++ b/src/main/py/read_math_function.py @@ -86,4 +86,6 @@ def simplify_exponential_function(type, function): if new_exponent == 0: result = [str(new_coefficient)] elif new_exponent == 1: - result = [f"{new_coefficient}x"] \ No newline at end of file + result = [f"{new_coefficient}x"] + else: + result = [f"{new_coefficient}x^{new_exponent}"] \ No newline at end of file