How to make a timer (the initial time is 5 seconds, when it reaches zero, the score is reset, except for the record, and when you press the right button, the time is restored), random numbers (when you press the right button, the time is restored and adds 1 point to the score, as well as to the record if it is beaten. And if the score is reset incorrectly) record for the game (when the score is greater than the record, it (record) overwritten and saved after exiting the game) a link to the site (there will be an icon in the corner if you click on it, the site will open) and how to make this game available for Android(.apk) in python? The game code itself:
from tkinter import *
import random as rn
root = Tk()
root.title('game')
root.geometry('720x1280')
clicks = 0
def click_button():
global clicks
clicks += 1
labelClick['text'] = str(clicks)
labelClick.pack()
count = rn.randrange(1,10,1)
print(count)
count = str(count)
if count == '1':
bgcolor='blue'
if count == '2':
bgcolor='green'
if count == '3':
bgcolor='red'
if count == '4':
bgcolor='yellow'
if count == '5':
bgcolor='orange'
if count == '6':
bgcolor='brown'
if count == '7':
bgcolor='violet'
if count == '8':
bgcolor='grey'
if count == '9':
bgcolor='pink'
#bgcolor='blue'
but_0 = Button(text=count, width=3, height=1, bg= bgcolor, font='Hack 30', command=click_button)
print(bgcolor)
but_0.place(x=310, y=140)
but_0['state'] = 'disabled'
labelClick = Label(root, text=clicks)
labelClick.pack()
but_1 = Button(text='1', width=3, height=1, bg='blue', font='Hack 30', command=click_button)
but_2 = Button(text='2', width=3, height=1, bg='green', font='Hack 30', command=click_button)
but_3 = Button(text='3', width=3, height=1, bg='red', font='Hack 30', command=click_button)
but_4 = Button(text='4', width=3, height=1, bg='yellow', font='Hack 30', command=click_button)
but_5 = Button(text='5', width=3, height=1, bg='orange', font='Hack 30', command=click_button)
but_6 = Button(text='6', width=3, height=1, bg='brown', font='Hack 30', command=click_button)
but_7 = Button(text='7', width=3, height=1, bg='violet', font='Hack 30', command=click_button)
but_8 = Button(text='8', width=3, height=1, bg='grey', font='Hack 30', command=click_button)
but_9 = Button(text='9', width=3, height=1, bg='pink', font='Hack 30', command=click_button)
but_1.place(x=210, y=240)
but_2.place(x=310, y=240)
but_3.place(x=410, y=240)
but_4.place(x=210, y=340)
but_5.place(x=310, y=340)
but_6.place(x=410, y=340)
but_7.place(x=210, y=440)
but_8.place(x=310, y=440)
but_9.place(x=410, y=440)
root.mainloop()