Week 3, programming assignment, Exercise 2

Can someone please help me to solve this error?

There are several different test cases there with different values. It appears that you must have hard-coded the return value for n_y so that it happens to pass the first test case, but not the second one. Or perhaps you are referencing global variables from the body of the layer_sizes function instead of the actual parameters being passed in.