From b1556b8dd955e52ec57b02784da9d7eb4ab9ad35 Mon Sep 17 00:00:00 2001 From: Manon Date: Mon, 27 Jan 2025 10:35:46 +0100 Subject: [PATCH] base --- projet_calculatrice.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/projet_calculatrice.py b/projet_calculatrice.py index 2b31972..9f5046a 100644 --- a/projet_calculatrice.py +++ b/projet_calculatrice.py @@ -4,7 +4,16 @@ class Expression : - def __init__ - def évalue + def __init__ (valeur_racine, fils_gauche, fils_droit): + self.valeur = valeur_racine + self.gauche = fils_gauche + self.droit = fils_droit + + def évalue (self): + if self.valeur == '*': + if self.valeur == '+': + + def __str__ : #affichage en dfs infixe - \ No newline at end of file + +