What is the sum of the odd numbers from 1523 through 10503, inclusive? Hint: write a while loop to accumulate the sum and print it. Then copy and paste that sum. For maximum learning, do it with a for loop as well, using range.
What I tried. I need to print the sum as a total. My answer gives me the individual runs.
i=1523
while i<10503:
sum=0
i=i+2
sum=sum+i
print(sum)
for i in range(1523,10503):
print(i+2)