tablica1d = [1,2,3,4,5,6] wiersz1 = [1,2,3] wiersz2 = [4,5,6] tablica2d = [wiersz1, wiersz2] # [[1, 2, 3], [4, 5, 6]] # [[1, 2, 3], [4, 5, 6]] print(tablica2d) def parzyste1d(tab, n): for i in range(n): # for i in 1..n step 1 begin element = tab[i] if element % 2 == 0: print(element) def parzyste2d(tab, wiersze, kolumny): for w in range(wiersze): element = tab[w] #print(f"element[{w}]->{element}") parzyste1d(element, kolumny) def parzyste2dV2(tab, wiersze, kolumny): for w in range(wiersze): element = tab[w] for k in range(kolumny): e = element[k] if e % 2 == 0: print(e) def parzyste2dV3(tab, wiersze, kolumny): for w in range(wiersze): for k in range(kolumny): e = tab[w][k] if e % 2 == 0: print(e) #rozmiar=6 #parzyste1d(tablica1d, rozmiar) #parzyste2d(tablica2d, 2, 3) #parzyste2dV2(tablica2d, 2, 3) parzyste2dV3(tablica2d, 2, 3)