from tkinter import *
root = Tk()
root.geometry("400x400")
root.resizable(0, 0)
root.config(bg="#ffcbdb")
root.title("Feliz dia da Mulher")
def limpar():
nome_entrada.delete(0, END)
def app():
n = nome.get()
mensagem = f"Feliz dia das Mulheres,\n{n}"
resultado.set(mensagem)
titulo = Label(text="Dia da Mulher",
font=("Arial", "15", "bold"),bg="#ffcbdb",fg="#bf9000")
titulo.place(relx=0.4, rely=0.05)
texto_sub1 = Label(text="Nome:",
font=("Arial", "12", "bold"),bg="#ffcbdb",fg="#bf9000")
texto_sub1.place(relx=0.15, rely=0.2)
nome = StringVar()
nome_entrada = Entry(textvariable=nome,
font=("Arial", "12", "bold"),
bg="white", fg="#ff3875", justify='center')
nome_entrada.place(relx=0.3, rely=0.2, relwidth=0.65)
but1 = Button(text="Carregar", bd=2, bg='#b30037', fg='white',
font=('verdana', 12, 'bold'), command=app)
but1.place(relx=0.2, rely=0.35, relwidth=0.2, relheight=0.1)
but_limpar = Button(text="Limpar", bd=2, bg='#b30037', fg='white',
font=('verdana', 12, 'bold'), command=limpar)
but_limpar.place(relx=0.45, rely=0.35, relwidth=0.2, relheight=0.1)
#
but_sair = Button(text="Sair", bd=2, bg='#b30037', fg='white',
font=('verdana', 12, 'bold'), command=root.destroy)
but_sair.place(relx=0.7, rely=0.35, relwidth=0.2, relheight=0.1)
resultado = StringVar()
resultado_texto = Label(textvariable=resultado,
font=("Arial", 12, "bold"), bg="#d15279")
resultado_texto.place(relx=0.05, rely=0.55, relwidth=0.9, relheight=0.4)
root.mainloop()