from tkinter import *

window = Tk()

window.title("Welcome to Tkinter!")
window.geometry('400x300+30+200')
window.configure(bg = "#8080F0")

lbl = Label(window, text="A label is here")
lbl.grid(column=1, row=0)


# Button functionality:
# One button adds 1 to the value,
# the other one subtracts 1 from the value

value = 0


def clicked1():
    global value
    value += 1
    lbl.configure(text="Value: " + str(value) )

btn1 = Button( window, text="Add 1", command=clicked1 )
btn1.grid(column=0, row=0)


def clicked2():
    global value
    value -= 1
    lbl.configure(text="Value: " + str(value) )

btn2 = Button( window, text="Sub 1", command=clicked2 )
btn2.grid(column=0, row=1)


window.mainloop()

