import tkinter as tk
def run():
    root= tk.Tk()

    canvas1 = tk.Canvas(root, width = 400, height = 300,  relief = 'raised')
    canvas1.pack()

    label1 = tk.Label(root, text='Calculate the Square Root')
    label1.config(font=('helvetica', 14))
    canvas1.create_window(200, 25, window=label1)

    label2 = tk.Label(root, text='Type your Number:')
    label2.config(font=('helvetica', 10))
    canvas1.create_window(200, 100, window=label2)

    entry1 = tk.Entry (root) 
    canvas1.create_window(200, 140, window=entry1)
    entry2 = tk.Entry (root) 
    canvas1.create_window(200, 170, window=entry2)
    def getSquareRoot ():
        
        x1 = entry1.get()
        
        label3 = tk.Label(root, text= 'The Square Root of ' + x1 + ' is:',font=('helvetica', 10))
        canvas1.create_window(200, 250, window=label3)
        
        label4 = tk.Label(root, text= float(x1)**0.5,font=('helvetica', 10, 'bold'))
        canvas1.create_window(200, 280, window=label4)
    def getSum():
        x1 = entry1.get()
        x2 = entry2.get()
        label5 = tk.Label(root, text= 'The Sum is:',font=('helvetica', 10))
        canvas1.create_window(200, 50, window=label5)
        
        label6 = tk.Label(root, text= int(x1)+int(x2),font=('helvetica', 10, 'bold'))
        canvas1.create_window(200, 80, window=label6)
    button1 = tk.Button(text='Get the Square Root', command=getSquareRoot, bg='brown', fg='white', font=('helvetica', 9, 'bold'))
    canvas1.create_window(150, 200, window=button1)
    button2 = tk.Button(text='Get the sum', command=getSum, bg='brown', fg='white', font=('helvetica', 9, 'bold'))
    canvas1.create_window(280, 200, window=button2)
    root.mainloop()