diff --git a/PJ/couleur.py b/PJ/couleur.py index b65f9f04ec2bfd49e6c9dd6a4fb5e853466729dc..e594fed79e268fc193773202835ab6bae3fd30b3 100644 --- a/PJ/couleur.py +++ b/PJ/couleur.py @@ -1,5 +1,5 @@ #Belkacemi Melissa -#13/03/2024 +# 31/03/2024 def couleur_moyenne(liste:list[tuple[int,int,int]])->tuple[int,int,int]: """déterminer la couleur moyenne d'une liste de couleurs sous la forme (r,g,b) @@ -28,7 +28,7 @@ def coul_sont_proches(coul1:tuple[int,int,int],coul2:tuple[int,int,int])->bool: renvoie True si les distances entre r1 et r2, v1 et v2, et b1 et b2 est inférieure à 10 - Précondition : + Précondition : les couleurs sont correctes Exemple(s) : $$$ coul_sont_proches((145,145,130),(140,136,132)) True @@ -44,4 +44,4 @@ def coul_sont_proches(coul1:tuple[int,int,int],coul2:tuple[int,int,int])->bool: """ r1,v1,b1=coul1 r2,v2,b2=coul2 - return (abs(r1-r2)<=10 and abs(v1-v2)<=10 and abs(b1-b2)<=10) \ No newline at end of file + return (abs(r1-r2)<=10 and abs(v1-v2)<=10 and abs(b1-b2)<=10)