Python Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Python Course
Register
Sigmoid function
+2
Author: TheWh¡teCat 🇧🇬
Dark
Public
Save
PY
py
1
2
3
4
5
w1
,
w2
,
b
,
x1
,
x2 =
[
float
(
x
)
for
x
in
input
()
.split
()]
import
math
output = w1*x1 + w2*x2 + b
output =
round
(
1
/
(
1
+ math.exp
(
output*
-1
)),
4
)
print
(
output
)
Enter to Rename, Shift+Enter to Preview
OUTPUT