Skip to content
Snippets Groups Projects
Commit a7054606 authored by Melissa Belkacemi's avatar Melissa Belkacemi
Browse files

Update bloc.py

parent e8bfb29c
Branches
No related tags found
No related merge requests found
#Belkacemi Melissa
#27/03/2024
from couleur import couleur_moyenne
#31/03/2024
from couleur import *
class Bloc:
""" une classe représentant des blocs
......@@ -34,10 +34,10 @@ class Bloc:
self.couleur=couleur_moyenne(couleurs)
def sont_proches(c1:tuple[int,int,int],c2:tuple[int,int,int],c3:tuple[int,int,int],c4:tuple[int,int,int]) ->bool:
"""Renvoie True si les 4 couleurs sont proches
def sont_proches(c1:tuple[int,int,int],c2:tuple[int,int,int],c3:tuple[int,int,int],c4:tuple[int,int,int]) ->bool:
"""Renvoie True si les 4 couleurs sont proches
"""
cm=couleur_moyenne([c1,c2,c3,c4])
return coul_sont_proches(c1,cm)and coul_sont_proches(c2,cm) and coul_sont_proches(c3,cm) and coul_sont_proches(c4,cm)
"""
cm=couleur_moyenne([c1,c2,c3,c4])
return coul_sont_proches(c1,cm)and coul_sont_proches(c2,cm) and coul_sont_proches(c3,cm) and coul_sont_proches(c4,cm)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment