UnboundLocalError C1 W3 Exercise 1

Error: Data-type mismatch.
Error: Wrong shape.
Error: Wrong output.
UnboundLocalError: local variable ‘learner_func_answer’ referenced before assignment

these errors appeared in exercise 1

The problem has been resolved I found myself typed x instead of X


Hello I have the same error and I have used X only, so where else I could be going wrong?

Hi Deepti,

Could you share more about the error?
Is there any part of the code where you had problems or any questions?

Please, if you need to share some part of the code, send it to me privately to try to solve it.

Best regards.

Thank you Carl for responding. I have sent the part of the code and the error pic to your inbox. Please have a look.

Thank you again

the error log which I got

ok mistakes done by calling wrong function randint as randit.

also I previously mentioned num_classes with the integer that was the second error.

I have solved the issue. Thank you @carlsaez as you asked I found my solution :slight_smile:


1 Like

Hi Deepti,

I’m glad it has been resolved and is working well. :slight_smile: