DevJourney · code I wrote while learning

for.py

90 B
n = int(input("Enter a number: "))

s = 0

for i in range(1, n + 1):
    s += i

print(s)