From e464cdf71790f5a7dc975118cdf2276717f83552 Mon Sep 17 00:00:00 2001 From: lisa Date: Mon, 12 Dec 2022 16:27:10 +0100 Subject: [PATCH] class carte --- main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main.py b/main.py index e69de29..afc8419 100644 --- a/main.py +++ b/main.py @@ -0,0 +1,14 @@ +class Carte: + def __init__(self,valeur, couleur): + self.valeur = valeur + self.couleur = couleur + + def compare(self, other): + self.other = other.valeur + if self.valeur > self.other : + return 1 + elif self.valeur < self.other : + return -1 + elif self.valeur == self.other : + return 0 + return None \ No newline at end of file