diff --git a/calculette.py b/calculette.py index dc5c0c3..4c0e2c3 100644 --- a/calculette.py +++ b/calculette.py @@ -25,18 +25,24 @@ class Expression: else : return "({str(self.gauche)} {self.valeur} {str(self.droite)})" -class Conversion: - lst = [self.valeur,self.gauche, self.droite] - def npi2tree (lst): - """fonction npi2tree prenant en paramètre une liste correspondant à l’expression en notation - polonaise inversée et renvoyant l’arbre (de type Expression) correspondant""" - p = Pile(lst) - # for i in lst (): +# class Conversion: +# lst = [self.valeur,self.gauche, self.droite] +# def npi2tree (lst): +# """fonction npi2tree prenant en paramètre une liste correspondant à l’expression en notation +# polonaise inversée et renvoyant l’arbre (de type Expression) correspondant""" +# p = Pile(lst) + + + + + + +# for i in lst (): # if + or * : # else : # return - + \ No newline at end of file diff --git a/intergraph.py b/intergraph.py new file mode 100644 index 0000000..6293be9 --- /dev/null +++ b/intergraph.py @@ -0,0 +1,39 @@ +from tkinter import * + +fenetre = Tk() + +label = Label(fenetre, text="Calculatrice") +label.grid(row=0, column=0) + +# Creating the buttons +bouton1 = Button(fenetre, text="1") +bouton1.grid(row=1, column=0) + +bouton2 = Button(fenetre, text="2") +bouton2.grid(row=1, column=1) + +bouton3 = Button(fenetre, text="3") +bouton3.grid(row=1, column=2) + +bouton4 = Button(fenetre, text="4") +bouton4.grid(row=2, column=0) + +bouton5 = Button(fenetre, text="5") +bouton5.grid(row=2, column=1) + +bouton6 = Button(fenetre, text="6") +bouton6.grid(row=2, column=2) + +bouton7 = Button(fenetre, text="7") +bouton7.grid(row=3, column=0) + +bouton8 = Button(fenetre, text="8") +bouton8.grid(row=3, column=1) + +bouton9 = Button(fenetre, text="9") +bouton9.grid(row=3, column=2) + +bouton0 = Button(fenetre, text="0") +bouton0.grid(row=4, column=1) + +fenetre.mainloop() \ No newline at end of file