Identify the error in the following block of code.
for x in range(2, 6):
print(x)
A. The first line is missing quotes.
B. The first line has a spelling error.
C. The second line has a spelling error.
D. The second line needs to be indented four spaces

Respuesta :

Answer:

D.The second line needs to be indented four spaces

Explanation:

Since the print statement is not indented, it is not part of the for loop. This means that there are no lines of code to be executed in the for loop, so this will cause an error.

D I had this question