I am new to Python and coding in general and am struggling with this code:
I have 2 arrays:
actual_y = [10,20,30,40,50,60,70,80,90]
predicted_y = [1,2,3,4,5,6,7,8,9]
I want to create a for loop that will produce the difference between actual_y(i) and predicted_y(i).
I tried this:
for i in actual_y:
for j in predicted_y:
D = i - j
print(D)
But I get an error when i run it. Any help is much appreciated!