Ответ:
1 способ: for
i = 2
a = 0
for i in range(i, 51):
a = a + i
print(a)
2 способ: while
while i < 50:
i = i + 1
3 способ: арифметическая прогрессия
a = (2 + 50 ) / 2 * 50
print (a)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
1 способ: for
i = 2
a = 0
for i in range(i, 51):
a = a + i
print(a)
2 способ: while
i = 2
a = 0
while i < 50:
i = i + 1
a = a + i
print(a)
3 способ: арифметическая прогрессия
a = (2 + 50 ) / 2 * 50
print (a)