Browse Source

added cast to int for simplify_exponential_function

remotes/origin/feature/feature-read-math-function-added-funktions
fd7794 11 months ago
parent
commit
13ae320ccc
  1. 4
      src/main/py/read_math_function.py

4
src/main/py/read_math_function.py

@ -78,4 +78,6 @@ def simplify_exponential_function(type, function):
return False return False
if 'x' not in function: if 'x' not in function:
return "Der Ausdruck muss die Variable 'x' enthalten." return "Der Ausdruck muss die Variable 'x' enthalten."
coefficient, exponent = function.split('x^')
coefficient, exponent = function.split('x^')
coefficient = int(coefficient) if coefficient else 1
exponent = int(exponent)
Loading…
Cancel
Save