1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
from tkinter import *
fenetre = Tk()
def choixDeCasses():
label = Label(fenetre, text="difficulté :")
label.pack()
value = StringVar()
bouton1 = Button(fenetre, text="Easy", relief=RAISED, command=fenetre.quit)
bouton2 = Button(fenetre, text="Normal", relief=RAISED,command=fenetre.quit)
bouton3 = Button(fenetre, text="Hard", relief=RAISED,command=fenetre.quit)
bouton1.pack()
bouton2.pack()
bouton3.pack()
choixDeCasses()
def imprime(L):
for ligne in range(L):
for colonne in range(L):
Button(fenetre, text='L%s-C%s' % (ligne, colonne), borderwidth=1).grid(row=ligne, column=colonne)
fenetre.mainloop() |
Partager