1)
for x in range(1,10+1):
n = x**2-10
print('x',x,'=',x,'^2 - 10 = ',n)
Пример:
x 1 = 1 ^2 - 10 = -9x 2 = 2 ^2 - 10 = -6x 3 = 3 ^2 - 10 = -1x 4 = 4 ^2 - 10 = 6x 5 = 5 ^2 - 10 = 15x 6 = 6 ^2 - 10 = 26x 7 = 7 ^2 - 10 = 39x 8 = 8 ^2 - 10 = 54x 9 = 9 ^2 - 10 = 71x 10 = 10 ^2 - 10 = 90
2)
N = int(input('N = '))
suma = 0
for i in range(6,6*N):
suma += i
print("Suma =",suma)
3)
m = []
s = 0
for x in range(-6,33):
s += x
m.append(x)
print("Середне = ",s/len(m))
Пример:
Середне = 13.0