Week1-Assignment 1: Could not get the First Test Z outcome right

I received the following error for my Assignment 1.

First Test: Z’s mean is incorrect. Expected: 0.5511276474566768
Your output: 0.26992722293098054

Welcome to the community !

I think the above code seems to be right, assuming there is “*” between “h” and “stride”, (and “w” and “stride”). It may be better to revisit your code before this loop.

By the way, posting code in this community is not recommended. Please remove it.
We usually start with an error description and traceback. If that is not enough, after some conversation, a mentor may ask you to DM your notebook.

Thanks for your prompt reply. I will remove my code immediately. It is good to know that the loop part is correct. I will double check the code before it. Thanks again!

I checked my coding before the loop and could not identify any errors myself. Could you please take a look at the partial coding below? I will remove it as soon as I receive the feedback.

{mentor edit: code removed}

@Rose_Wang , you’ve already been asked to not post your code on the Forum.
If a mentor wants to see your code, they’ll ask you to send it to them via a private message.

Here is the summary.

“Indentation” is quite important for Python, since code with the same indentation level are treated as a single code block. So, if there are several nested loops, then, the indentation level is getting deeper. In that case, we really need to be very careful, since we can easily put a code into different code block.