Exercise 7- predict

this is my code, i think i did correct code,but i have erros.and the output is incorrect.

A=sigmoid(np.dot(w.T,X)+b)

if A[0,i] <= 0.5:
Y_prediction[0,i] =0
else:
Y_prediction[0:i] =1

Have a careful look at the code in the “else” clause there. Notice that “0:i” is not the same thing as “0,i”. Proofreading is an important skill for a programmer: the difference between ; and : can ruin your whole afternoon. :nerd_face:

BTW I assume that the fact that the indentation there doesn’t make any sense is just some kind of “copy/paste” or rendering problem. That code as shown would never run.