weight = 0.5
input = 0.5
goal_prediction = 0.8

for iteration in range(20):
    pred = input * weight
    error = (pred - goal_prediction) ** 2
    direction_and_amount = (pred - goal_prediction) * input
    weight = weight - direction_and_amount
    
    print("Error:" + str(error) + " prediction:" + str(pred))

3851806b5d6c3eb94439d2a57b028cf9fe2b457a
<mask token>

<mask token>
for iteration in range(20):
    pred = input * weight
    error = (pred - goal_prediction) ** 2
    direction_and_amount = (pred - goal_prediction) * input
    weight = weight - direction_and_amount
    print('Error:' + str(error) + ' prediction:' + str(pred))

weight = 0.5
input = 0.5
goal_prediction = 0.8
for iteration in range(20):
    pred = input * weight
    error = (pred - goal_prediction) ** 2
    direction_and_amount = (pred - goal_prediction) * input
    weight = weight - direction_and_amount
    print('Error:' + str(error) + ' prediction:' + str(pred))

weight = 0.5
input = 0.5
goal_prediction = 0.8

for iteration in range(20):
    pred = input * weight
    error = (pred - goal_prediction) ** 2
    direction_and_amount = (pred - goal_prediction) * input
    weight = weight - direction_and_amount
    
    print("Error:" + str(error) + " prediction:" + str(pred))
