Mundo em Python

Feliz Natal

from tkinter import *
from tkinter import messagebox def mostrar_mensagem():
messagebox.showinfo("Boas Festas!", "Desejamos um Feliz Natal e um Próspero Ano Novo!") root = Tk()
root.title("Postal de Natal")
root.geometry("600x400")
root.resizable(False, False) root.configure(bg="#f5f5dc") try:
from PIL import Image, ImageTk
imagem_fundo = Image.open("natal.jpg")
imagem_fundo = imagem_fundo.resize((600, 400), Image.ANTIALIAS)
imagem_fundo_tk = ImageTk.PhotoImage(imagem_fundo)
label_fundo = Label(root, image=imagem_fundo_tk)
label_fundo.place(x=0, y=0, relwidth=1, relheight=1)
except:
pass
titulo =Label(root, text="Feliz Natal!", font=("Times New Roman", 36, "bold"), fg="red", bg="#f5f5dc")
titulo.pack(pady=20) mensagem = Label(
root,
text="Que esta época traga paz, amor e alegria para você e sua família!",
font=("Arial", 16),
fg="green",
bg="#f5f5dc",
wraplength=500,
justify="center"
)
mensagem.pack(pady=10) botao = Button(root, text="Clique para uma mensagem especial", command=mostrar_mensagem, bg="gold", fg="black", font=("Arial", 12, "bold"))
botao.pack(pady=20)
rodape = Label(root, text="Boas Festas e um Próspero Ano Novo!", font=("Courier", 14, "italic"), fg="blue", bg="#f5f5dc")
rodape.pack(side="bottom", pady=10)
root.mainloop()
0