You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write a program that reads an integer and calculates the value of its logistic function.
A logistic function, or sigmoid function, is a function defined by the formula \sigma(x) = \frac{1}{1 + e^{-x}} = \frac{e^x}{e^{x} + 1}
σ(x)=1/(1+e^(−x)) = e^x/((e^x)+1)
Print the result rounded to 2 decimal places.
You can use math.e constant equal to 2.718281… or sort of a shortcut math.exp(x) function, which is considered more accurate than math.e ** x or pow(math.e, x).