Hi every one …
Can somebody tell me why my implementation won’t pass the tests? I’m pretty sure it’s correct
{moderator edit - solution code removed}
Hi every one …
Can somebody tell me why my implementation won’t pass the tests? I’m pretty sure it’s correct
{moderator edit - solution code removed}
Welcome to the community.
First of all, please do not paste your code in here. It is not recommended.
Both 2 lines that you added are incorrect. Looks like you just copied the instruction, but that is only part of answers, of course. Instructions do never provide answers.
There are two key points.
What you need to implement is this equation.
And, what you implemented is just part of it.
So, you need to implement the rest, and also consider \frac{1}{m}.
thanks for yout answer. I ended up with this equation, and I worked perfectly
{moderator edit - solution code removed}
Ok… thanks. I see the phrase “one part”… I’ll give it a try again
Pd. Why is not recommended to paste my code here?
Bes regards
Pd. Why is not recommended to paste my code here?
Actually, it is strictly prohibited. This is an open community. So, anyone can take a look, and may pickup code that someone wrote for grader assignments.
Ok… thanks. I see the phrase “one part”… I’ll give it a try again
You already implemented the rest in updated equation.
then … How can I show the state of my code so that I can be advised or corrected??
Best regards
Usually, we try to diagnose from the Traceback. If there is no clue, then, mentors may ask you to DM a notebook file privately.
For the community rule, please refer this. Discourse Guidelines