This commit is contained in:
2026-05-26 15:01:50 +02:00
parent 6a948ffe9f
commit a645291f8b
55 changed files with 1337 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
import numpy as np
def zad2(n: int) -> np.ndarray:
n_2 = n**2
a: np.ndarray = np.arange(1, n_2 + 1)
a = a.reshape(n, n)
for i in range(1, n + 1):
if i % 2 != 0:
a[i, :] = np.flip(a[i, :])
return a
if __name__ == "__main__":
a = zad2(4)
print(a)