In the week 4 programming assignment 1, the term “number of layers” is used differently from that in the course lecture.
In the assignment, the number of layers includes the input layer:
L = len(layer_dims) # number of layers in the network
In the course lecture, the number of layers doesn’t include the input layer.
I suggest changing the description in the programming assignment to be consistent with that in the course lecture.