"""
    累加
"""
result = 0
for item in range(4):
    print(item)
    result += item
print(result)
print("---------------")
result = 0
for item in range(2, 7):
    print(item)
    result += item
print(result)
print("---------------")
result = 0
for item in range(1, 8, 2):
    print(item)
    result += item
print(result)
print("---------------")
result = 0
for item in range(8, 3, -1):
    print(item)
    result += item
print(result)
print("---------------")
result = 0
for item in range(-1, -6, -1):
    print(item)
    result += item
print(result)
