Feladatok 3

This commit is contained in:
2021-11-26 10:13:26 +01:00
parent f989207478
commit b234874262
7 changed files with 105 additions and 0 deletions

22
ciklus/ciklus.py Normal file
View File

@@ -0,0 +1,22 @@
xs = [12, 10, 32, 3, 66, 17, 42, 99, 20]
j = 9
for i in range(8):
print(xs[j])
j -= 1
for i in range(8):
print(xs[i] + " " + pow(xs[i], 2))
osszeg = 0
for i in range(8):
osszeg += xs[i]
print(osszeg)
for i in range(7):
for j in range(8):
print(xs[i] * xs[j])