diff --git a/intergraph.py b/intergraph.py index 16428d3..1bcf3b9 100644 --- a/intergraph.py +++ b/intergraph.py @@ -1,48 +1,20 @@ from tkinter import * +from calculette import * +fenetre=Tk() +fenetre.title("Calculatrice") -fenetre = Tk() +calcLabel = Label(fenetre, text="saisir le calcul") +calcLabel.pack() -bouton1 = Button(fenetre, text="1") -bouton1.grid(row=2, column=0) +calc = StringVar() +calc.set("") +saisie = Entry(fenetre, textvariable=calc, width=10) +saisie.pack() -bouton2 = Button(fenetre, text="2") -bouton2.grid(row=2, column=1) +bouton1 = Button(fenetre, text="CALCULER", width=8) +bouton1.pack() -bouton3 = Button(fenetre, text="3") -bouton3.grid(row=2, column=2) +fenetre.mainloop() -bouton4 = Button(fenetre, text="4") -bouton4.grid(row=1, column=0) - -bouton5 = Button(fenetre, text="5") -bouton5.grid(row=1, column=1) - -bouton6 = Button(fenetre, text="6") -bouton6.grid(row=1, column=2) - -bouton7 = Button(fenetre, text="7") -bouton7.grid(row=0, column=0) - -bouton8 = Button(fenetre, text="8") -bouton8.grid(row=0, column=1) - -bouton9 = Button(fenetre, text="9") -bouton9.grid(row=0, column=2) - -bouton0 = Button(fenetre, text="0") -bouton0.grid(row=3, column=1) - -boutonadd = Button(fenetre, text="+") -boutonadd.grid(row=0, column=3) - -boutonmultiplie = Button(fenetre, text="*") -boutonmultiplie.grid(row=2, column=3) - -boutonminus = Button(fenetre, text="-") -boutonminus.grid(row=1, column=3) - -boutondivide = Button(fenetre, text="/") -boutondivide.grid(row=3, column=3) -fenetre.mainloop() \ No newline at end of file