I am trying to use a for loop to calculate the sum as the total number of values in the series increase by the power of 10. My code so far does not calculate anything. I apologise. I'm new to Python and still learning. Any help is much appreciated! Thank you!
This is my code:
i = 1
sum = 100
for num in range((-1)^(i+1)):
sum += num
print("The sum of the first ", i, "numbers is: ", sum )
EDIT Hello, thank you for all your help! But it seems like for my problem, I need to individually print out all three of the summations using the for loop. Could I perhaps ask for help on this part? Thank you so much!