Spaces:
Sleeping
Sleeping
class Coefficients: | |
def __init__(self, serie, matieres): | |
self.serie = serie | |
self.matieres = matieres | |
def get_coefficient(self, matiere): | |
if matiere not in self.matieres: | |
raise ValueError(f"Matière '{matiere}' non trouvée dans les coefficients pour la série {self.serie}.") | |
return self.matieres.get(matiere, 1) |