Помогите, как на фон программы вставить любую картинку или гифку?
from tkinter import *
def func():
tex.delete(1.0, END)
N = int(ent.get())
F = N
for i in range(2, F):
if F%i==0:
d=0
for B in range(2, i):
if i % B ==0:
d+= 1
if d == 0:
por = 0
while N % i ==0:
por += 1
N=N//i
#print("делитель",i,"порядок",por)
s=f"делитель {i}, порядок {por}"
tex.insert("end", s)
def delete_text():
tex.delete(1.0, END)
#tex = Text(root,width=40,
# font="Verdana 12",
# wrap=WORD)
def close_win():
root.destroy()
root = Tk() #главный экран
root.title('1.6 Разложение числа на простые множители')#название главного окна
root.geometry('700x300')
root.resizable(width = False, height = False)
root['bg'] = '#ff2400'
lab1 = Label(root, text = 'Разложить целое число на простые множители. \n Вывести на экран все простые множители \n (в порядке возрастания) и их порядки.',background = "#ff2400", font = 'Arial 12')
lab2 = Label(root, text = 'Введите n:',background = "#ff2400", font = 'Arial 12 bold')
ent = Entry(root)
but = Button(root)
but1 = Button(text = 'Разложить',background = "#ff2400", command = func, font = 'Arial 12')
tex = Text(width = 18, height =5 , font = 'Arial 12')
but2 = Button(text="Удалить",background = "#ff2400", command=delete_text)
but3= Button(text="Выход",background = "#ff2400", command=close_win, font = 'Arial 14').place(relx=0.1, rely=0.8)
lab1.pack()
lab2.pack()
ent.pack()
but1.pack()
tex.pack()
but2.pack()
root.mainloop()
Источник: Stack Overflow на русском