class Monnaie(): def __init__(self,un=0,deux=0,cinq=0): self.un = un self.deux = deux self.cinq = cinq def pièces(self): return self.un+self.deux+self.cinq def total(self): return self.un+2*self.deux+5*self.cinq def __repr__(self): aff = '('+str(self.un)+'\u2460 , '+str(self.deux)+'\u2461 ,'+str(self.cinq)+'\u2464 )' aff += ' total '+str(self.total())+' cents en '+str(self.pièces())+' pièces' return aff