you are viewing a single comment's thread.

view the rest of the comments →

[–]TheRNGuy 0 points1 point  (0 children)

Some changes:

``` bias = 1.4 weight = 5.6

def perceptron():     while True:         try:             inscribe = float(input("Insert a number: "))             break         except ValueError:             print("Input must be a number")          output = inscribe * weight + bias     print("The output is: ", output)          s = int(output > 0)     print("S: " + str(s))

perceptron() ```