Click Step to run the program line by line and watch the variables change. Type the number when the program asks for it.
n = int(input("n = "))
s = 0
for i in range(1, n + 1):
s += i
print(i, s)
print("Sum:", s)
Click Step to run the program line by line and watch the variables change. Type the number when the program asks for it.
n = int(input("n = "))
s = 0
for i in range(1, n + 1):
s += i
print(i, s)
print("Sum:", s)