When you run this as a .py file in Command Prompt, Python reads the entire file and interprets the indentation correctly. However, in VS Code's interactive mode (Python REPL), each line is executed as you enter it, and the continuation of code blocks works differently.
hence correct code(for vs-code) will be:
squares = []
for value in range(0,11):
square = value ** 2
squares.append(square)
print(squares)