# Inconsistent quiz question and assignment: what is actually correct?

In the quiz, this answer is wrong:

However, in the programming assignment, we are told in L_model_forward implementation, to have a loop from [1…L), and then a separate equation outside the for loop for the last layer - the output layer:

def L_model_forward(X, parameters):

# Implement [LINEAR → RELU]*(L-1). Add “cache” to the “caches” list.
# The for loop starts at 1 because layer 0 is the input
for l in range(1, L):

# Implement LINEAR → SIGMOID. Add “cache” to the “caches” list.
AL, cache = linear_activation_forward(…)

So the question is: what is the correct approach? And if the approach in the assignment is the right one (which I think it is), then why a different thing is being asked in the quiz/a different notation/agreement is used in the quiz?

Confusing

This is because when you use for loop
For i in range(1,L):
It starts from 1 and end with L-1 and we have L layers so there are 1 layer not computed which is output layer but when we in lecture we use notation for loop L which mean we have L layer but it is just illustration for simplify the lecture

I hope I answered you questions,