Python Forum
please help me convert this formula via the math module - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: please help me convert this formula via the math module (/thread-41925.html)



please help me convert this formula via the math module - tinx_ss - Apr-09-2024

the formula is in the pic and i tried typing it:
b=5√(K*∛(0,01)+(1-e^x)^2 )
thank you!


RE: please help me convert this formula via the math module - deanhystad - Apr-10-2024

** 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