You can actually look at the contents of the parameters
dictionary. One way is:
print(parameters.keys())
Or you can examine the test code by clicking “File → Open” and opening the appropriate python file. Find the source code that creates the test inputs to see how the parameters
dictionary is constructed.
But the point is that there are two parameters for each layer: W^{[l]} and b^{[l]}, which is why we need to divide by 2 there.
The error messages from the test mean your code is generating incorrect values. It could be that either the A^{[L]} value is wrong or that the caches are not correct. Notice that the error messages say that even the shapes of your values are incorrect.
One good way to start debugging in a case like this is to do the “dimensional analysis”, so that you know what you should be expecting at each layer. Here’s a thread which walks you through that for the test case here.