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 34 35 36 37 38 39 40
| from tkinter import*
from random import*
L=[1,2,3,4,5,6,7,8,9,10,25,50,75,100]
plaquettes=[]
for i in range(6):
plaquettes.append(choice(L))
print("Plaquettes=",plaquettes)
nb=randrange(101,1000)
print(nb)
#fenêtre pricipale de l'interface graphique
fenetre=Tk()
fenetre.title("LE COMPTE EST BON")
texte1=Label(fenetre,text="Bienvenue dans le compte est bon",bg="white",fg="black",font=("Comic Sans MS",16,"bold"))
texte1.pack()
texte2=Label(fenetre,text=plaquettes,bg="white",fg="black",font=("Arial",16,"bold"))
texte2.pack()
texte3=Label(fenetre,text=nb,bg="white",fg="black",font=("Arial",16,"bold"))
texte3.pack()
#widgets
L=800
H=500
canevas=Canvas(fenetre,bg="white",height=H,width=L)
canevas.pack() |
Partager