Browse Source

base

master
Manon 4 weeks ago
parent
commit
b1556b8dd9
  1. 13
      projet_calculatrice.py

13
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

Loading…
Cancel
Save