Robo is running a Lemonade Stand. He wants to guess how many cups he will sell.
He knows that Hotter Weather = More Sales.
In AI, this "Guessing Game" is called Prediction.
How do we turn Temperature into Sales? We multiply by a number called a Weight.
Here, Robo thinks: "For every 1 degree of heat, I sell 2 cups."
So, 30 degrees = 60 cups!
It's a hot day! Set temp = 40 degrees.
Set a weight = 2.
temp = 40 weight = 2
Calculate prediction by multiplying temp and weight.
prediction = temp * weight print(prediction)
Robo actually sold 100 cups! How wrong was he?
Calculate actual = 100 and error = actual - prediction.
actual = 100
error = actual - prediction
print("Error:", error)
1. If the Error is 0, what does that mean?