From 60f835443918f913c0fd92cc90b0c2ffa7769f8a Mon Sep 17 00:00:00 2001 From: v21235334 <jonathan.villa@etu.univ-amu.fr> Date: Fri, 10 Jan 2025 13:55:15 +0100 Subject: [PATCH] question 3 13h55 --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 3694eff..ad72934 100644 --- a/main.py +++ b/main.py @@ -7,9 +7,9 @@ class TabletteChocolat: assert (self.m==int(self.m) and self.n==int(self.n)) except: return(ValueError) + def __str__(self): + return('Tablette de chocolat de ' + str(self.m) + 'x' + str(self.n)) T1=TabletteChocolat(1,2) T2=TabletteChocolat(1.5,7) -T=T1.typage - -- GitLab