intermediate
Debug Python Logic Error
Identify and fix a logic error in a Python script calculating a sum.
📝 プロンプトの内容
I have a Python script that is supposed to calculate the sum of numbers from 1 to 10, but it currently returns 0. Please review the following code, identify the logic error, and provide the corrected version: total = 0; for i in range(10): total = i; print(total)