Theory ofIntelligence
← PRACTICE/
Beginner
Deep Learning• Neural networks

Implement sigmoid function

Implement the sigmoid function: sigma(x) = 1 / (1 + exp(-x)).

Input: One line with a single number x.

Output: sigmoid(x) rounded to 4 decimal places.

Example:

  • Input: 0
  • Output: 0.5
Sample Test Verification
2 Test Cases
Sample Input (stdin)
0
Expected Output (stdout)
0.5
solution.py
Initializing Monaco Python Environment...
Input (stdin)
0
Expected Output (stdout)
0.5