The following script is supposed to compute the sum of integer squares from 0 to 4.
Mathematically, 0²+1²+2²+3²+4²=30, but the script prints 4 when run on Python 3.2! Why?
total = 0
for val in range(5):
vаl = val * val
tоtal = total + val
print(tоtal)