Browse Source

ampoule fonctionel

master
RAVET Célya 1 month ago
parent
commit
1445112bac
  1. 11
      projet_tkinter.py

11
projet_tkinter.py

@ -1,13 +1,12 @@
import tkinter as tk import tkinter as tk
def allumer (): def allumer ():
rond = canva.create_oval(310,130,200,300,fill='yellow') canva.itemconfigure(rond, fill='yellow')
rectangle=rectangle =canva.create_rectangle canva.itemconfigure(rectangle,fill='black')
(230,300,280,380, fill='black')
canva=tk.Canvas(fenetre, width=500, height=500, bg='white')
def eteindre (): def eteindre ():
rond = canva.create_oval(310,130,200,300,fill='black', canva.itemconfigure(rond,fill='black',outline='white')
outline='white') canva.itemconfigure(rectangle,fill='white')
fenetre = tk.Tk() fenetre = tk.Tk()
fenetre.title('lampe') fenetre.title('lampe')

Loading…
Cancel
Save