Week 4: quiz question 5 about layer_dim

In question 5 of week 4’s quiz:
layer_dims = [nx, 4,3,2,1].
I have tried to code it in a python page, and len(layer_dims)=5
So if I choose this one:
Screenshot 2021-07-25 at 20.06.59
It means I am initializing 5 w and b. However, there are only 4 hidden layers, so I would be initializing one w and b too many.

Where is my problem? should len(layer_dims)=4?
Isn’t nx the size of the input vector x?

Thank you for your answer,

Best,

Remember that array indices and loop indices in python are “zero based”. Try running the following loop and watch what happens:

for ii in range(1,5):
    print(f"ii = {ii}")