ex2: Sigmoid function