import tkinter as tk from tkinter.constants import * class Fenetre(tk.Tk): def __init__(self): tk.Tk.__init__(self) self.title("Calculatrice") self.geometry("400x600") self.configure(bg='pink') tk.Canvas(self, width=350, height=175, bg='ivory').pack(side=TOP, padx=5, pady=25) self.frame = tk.Frame(self, bg='pink') self.entree = tk.Entry(self.frame, width=30) self.entree.pack(side=TOP, anchor='n', padx = 5, pady = 100) self.bouton = tk.Button(self.frame, text="Calculer", bg='white').pack(anchor = 's', padx = 100, pady = 10) self.frame.pack(padx = 5, pady =40) window = Fenetre() window.mainloop()