Course 5 week 1 assignment 2 Sampling

I am getting no index output can someone help me with this?

Are you appending the idx you get from sampling based on distribution of y to indices?

[code snippet removed]

Yes

Please click my name and message your notebook as an attachment.

You have initialized counter to 50. That’s the bug.

oh okay got it. I have to initialize it to 0, it is then increasing with counter+ till 50

Thanks