how to make a sigmoid function in python

  return 1 / (1 + math.exp(-x))

Here is what the above code is Doing:
1. We’re defining a function that takes in a number, x, and returns the sigmoid of that number.
2. We’re using the math.exp() function, which takes in a number and returns e to the power of that number.
3. We’re putting it all together to return the sigmoid of x.