How can I use “e” (Euler’s number) and power operation in python 2.7
You can use exp(x) function of math library, which is same as e^x. Hence you may write your code as: I have modified the equation by replacing 1/2 as 0.5. Else for Python <2.7, we’ll have to explicitly type cast the division value to float because Python round of the result of division of two … Read more