189 x 126 86 x 87
https://www.blogger.com/blog/post/edit/preview/705067943936137407/8237077484565746551 is the link to creating Bingo cards. Here, we simulate the game play.
from tkinter import *
from random import shuffle
win = Tk()
win.config(bg="white")
win.title("B C R S Children's Day B I N G O")
scrWidth = win.winfo_screenwidth()
scrHeight = win.winfo_screenheight()
winWidth, winHeight = 1200, 680
x = scrWidth//2 - winWidth//2
y = scrHeight//2 - winHeight//2 - 40
win.geometry("%dx%d+%d+%d" % (winWidth, winHeight, x, y))
ctr = 0
L = [i for i in range(1, 91)]
shuffle(L)
def Next():
global ctr
num = L[ctr] # Next number to call
txt1['state'] = NORMAL
txt2['state'] = NORMAL
if num < 10:
lbl2.config(text=(' ' + str(num)))
else:
lbl2.config(text=(' ' + str(num)))
if num < 10:
txt1.insert(END, ' ' + str(num) + ' ')
else:
txt1.insert(END, str(num) + ' ')
L1 = sorted(L[:ctr+1])
txt2.delete("0.0", END)
for i in range(len(L1)):
if L1[i] < 10:
txt2.insert(END, ' ' + str(L1[i]) + ' ')
else:
txt2.insert(END, str(L1[i]) + ' ')
if ctr < 89:
ctr += 1
txt1['state'] = DISABLED
txt2['state'] = DISABLED
if ctr == 90:
btn1['state'] = DISABLED
pic1 = PhotoImage(file="Bingo.png")
lbl1 = Label(win, image=pic1, border=0)
lbl1.place(x=500, y=545)
lbl2 = Label(win, font=("Verdana", 32, "bold"), bg="yellow", width=3,
relief="raised", borderwidth=3, anchor="w", border=2)
lbl2.place(x=150, y=580)
txt1 = Text(win, font=("Verdana", 26, "bold"), width=47, bg="blue",
fg="white", height=6, undo=False)
txt1.place(x=10, y=10)
txt2 = Text(win, font=("Verdana", 26, "bold"), width=47, bg="green",
fg="white", height=6, undo=False)
txt2.place(x=10, y=280)
pic2 = PhotoImage(file="Bingo Next.png")
btn1 = Button(win, image=pic2, command=Next)
btn1.place(x=950, y=550)
win.mainloop()