Вариант 1: print 1+2+3+4+5+6+7+8+9+10
Вариант 2:
summ = 0
for i in range(1, 11):
summ = summ + i
print summ
Вариант 3:
x = 10
print x*(x+1) / 2
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Вариант 1: print 1+2+3+4+5+6+7+8+9+10
Вариант 2:
summ = 0
for i in range(1, 11):
summ = summ + i
print summ
Вариант 3:
x = 10
print x*(x+1) / 2