def guess():
    num = int(num1.get())
    try:
        if (num > ans):
            raise ValueLargeError
        elif (num < ans):
            raise ValueSmallError
        else:
            Label(root, text='Congratulations, You won !!').grid(column=0, row=3)
    except ValueLargeError:
        Label(root, text='Your no is large, guess again').grid(column=0, row=3)
    except ValueSmallError:
        Label(root, text='Your no is small, guess again').grid(column=0, row=3)
    return
def guess():
    num = int(num1.get())
    try:
        if (num > ans):
            raise ValueLargeError
        elif (num < ans):
            raise ValueSmallError
        else:
            Label(root, text='Congratulations, You won !!').grid(column=0, row=3)
    except ValueLargeError:
        Label(root, text='Your no is large, guess again').grid(column=0, row=3)
    except ValueSmallError:
        Label(root, text='Your no is small, guess again').grid(column=0, row=3)
    return