Lists and For Loops Practice Problems - 6 & 7 - Doesn't detect variables (variable isn't defined)

In the practice problems “Lists and For Loops Practice Problems”, problem 6 and 7 by now, for the first time the site doesn’t detect the variables I have defined, even using the official answer given in the Help button.

  • Answer for 6)
values = [16, 1, 7, 2, 19, 12, 5, 20, 2, 10, 17, 14, 1, 9]

# Write your answer below
reversed_values = []
for i in range(len(values)):
    reversed_values.append(values[-i - 1])

reversed_values isn’t defined in your code, but we expected it to be list type

  • Answer for 7)
answer = 3

answer isn’t defined in your code, but we expected it to be int type

1 Like

Please can you post your code and link to the problem.

Thanks for your reply.
Everything is in my original post, the code I use (it’s the official correct answer given in Help) and the error it returns (in red). It just doesn’t recognize the declared variable in each case.
I have only had that issue with these two problems; I don’t really care, it was just in case it happens to someone else.


It has worked today! SOLVED.

1 Like