# two buttons On and Off
#ronm333tkButtonsPlayGround.py
import tkinter as tk
import tkinter.font
from gpiozero import LED

win=tk.Tk()

# set window size
win.geometry("300x200")

win.title("Two Buttons On and Off")
myFont=tkinter.font.Font(family = 'Helvetica', size = 12, weight = "bold")
led=LED(21)

def turnLedOn():
    led.on()
    
def turnLedOff():
    led.off()
    
def exitProgram():
    win.quit()
    
ledButton=tk.Button(win, text='Turn LED On', font=myFont, command=turnLedOn, bg='bisque2', height=2, width=20)
ledButton.place(x=50, y=20)

ledButton=tk.Button(win, text='Turn LED Off', font=myFont, command=turnLedOff, bg='bisque2', height=2, width=20)
ledButton.place(x=275, y=20)

exitButton=tk.Button(win, text='Exit', font=myFont, command=exitProgram, bg='cyan', height=2, width=6)
exitButton.place(x=300, y=100)

tk.mainloop()