You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
377 B
19 lines
377 B
# BELLYNCK Manon
|
|
# GUILLAUMIN-TORRES Ambre
|
|
# COVIN Clara
|
|
|
|
class Expression :
|
|
|
|
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
|
|
|
|
|
|
|