Apr-10-2024, 12:51 AM
** is the power operator, not ^. You can also use the power operator for roots x ** (1/2) is square root and x ** (1/3) is cubed root. For Euler's number (e) you will need to look at the math library. You'll also find functions for ex (exp(x)), xy (pow(x, y). There is no function for roots, but you can use pow() with a fraction for the exponent.
https://docs.python.org/3/library/math.html
https://docs.python.org/3/library/math.html