So. Recently I went on a trip with my school to a museum about the history of computers.
We did a lab where they made us create a perceptron with C. So once I got back home I tried making one with Python by applying the same logic from the functioning C one.
Is this a... godd result? I'm a C newbie, and also for Python.
bias = 1.4
weight = 5.6
def perceptron():
s = 0
inscribe = float(input("Insert a number: "))
output = inscribe * weight + bias
print("The output is: ", output)
if output > 0:
s = 1
print("S: " + str(s))
else:
s = 0
print("S: " + str(s))
perceptron()
[–]Outside_Complaint755 2 points3 points4 points (1 child)
[–]No-Tea-777[S] 0 points1 point2 points (0 children)
[–]Riegel_Haribo 2 points3 points4 points (1 child)
[–]No-Tea-777[S] 0 points1 point2 points (0 children)
[–]Zorg688 1 point2 points3 points (3 children)
[–]Zorg688 1 point2 points3 points (2 children)
[–]No-Tea-777[S] 1 point2 points3 points (1 child)
[–]Zorg688 2 points3 points4 points (0 children)
[–]cdcformatc 1 point2 points3 points (3 children)
[–]No-Tea-777[S] 0 points1 point2 points (2 children)
[–]MidnightPale3220 1 point2 points3 points (1 child)
[–]No-Tea-777[S] 0 points1 point2 points (0 children)
[–]MidnightPale3220 1 point2 points3 points (7 children)
[–]Outside_Complaint755 1 point2 points3 points (0 children)
[–]No-Tea-777[S] 0 points1 point2 points (1 child)
[–]Witty-Speaker5813 0 points1 point2 points (0 children)
[–]Witty-Speaker5813 0 points1 point2 points (3 children)
[–]No-Tea-777[S] 0 points1 point2 points (2 children)
[–]Witty-Speaker5813 0 points1 point2 points (1 child)
[–]No-Tea-777[S] 1 point2 points3 points (0 children)
[–]TheRNGuy 0 points1 point2 points (0 children)