import tkinter
import tkinter.messagebox
import random
bingo = random.randint(1,100)
def btn_click():
num = int(e.get())
if num > bingo:
l.config(text="It is bigger")
elif num < bingo:
l.config(text="It is smaller")
else:
tkinter.messagebox.showinfo("Tips","Bingo!")
main.destroy()
main = tkinter.Tk()
main.title('Hello tkinter')
main.geometry('300x200')
l = tkinter.Label(main, text='Guess a number:')
l.config(bg='red')
l.config(fg='white')
l.config(height=2)
l.config(width=20)
l.pack()
e = tkinter.Entry(main)
e.insert(0,'50')
e.pack()
b = tkinter.Button(main,text='OK')
b.config(bg='green')
b.config(command=btn_click)
b.pack()
main.mainloop()