Skip to content
Snippets Groups Projects
Commit cd48c177 authored by Kinadinova Dariya's avatar Kinadinova Dariya
Browse files

liste_col change

parent 743e1cc3
Branches
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ def avg_col(l:list[int]) -> list[int]:
avg3 = c3 / n_col
return (avg1, avg2, avg3)
def liste_col(im: Image, left_top: tuple(int), right_bottom: tuple(int)) -> list[int]:
def liste_col(im: Image, left_top: tuple(), right_bottom: tuple()) -> list[int]:
"""à_remplacer_par_ce_que_fait_la_fonction
Précondition :
......@@ -36,5 +36,12 @@ def liste_col(im: Image, left_top: tuple(int), right_bottom: tuple(int)) -> list
$$$
"""
x_min, y_min = left_top
x_max, y_max = right_bottom
l = []
for i in range((x_max+1)*(y_max+1)):
l.append(im.getpixel((x, y) for x in range(x_max+1) for y in range(y_max+1)))
return l
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment