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=0, row=0)


# Button functionality:

# Another parametr of the button constructor is
# the specification of the function which is performed
# whenever the button is clicked

def clickedFunction():
    x = 23
    y = x*(x+1)
    lbl.configure(text="My result is" + str(y))

btn = Button(window, text="Click here", command=clickedFunction)
btn.grid(column=1, row=0)

window.mainloop()

