Browse Source

added calculation for simplify_exponential_function

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

4
src/main/py/read_math_function.py

@ -80,4 +80,6 @@ def simplify_exponential_function(type, 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 coefficient = int(coefficient) if coefficient else 1
exponent = int(exponent)
exponent = int(exponent)
new_coefficient = coefficient * exponent
new_exponent = exponent - 1
Loading…
Cancel
Save