Programming wale ™
Відкрити в Telegram
📍Do join for coding resources, Handwritten notes & Quizzes! 🧑💻 WhatsApp Channel 👉 https://whatsapp.com/channel/0029Va5v1qv4SpkGfCAjsy30
Показати більше4 661
Підписники
Немає даних24 години
-207 днів
-8730 день
Архів дописів
4 661
import tkinter as tk
import random
def show_popup():
popup = tk.Toplevel(root)
popup.title("Popup")
label = tk.Label(popup, text="Thanks for Accepting")
label.pack(padx=20, pady=20)
def move_button(event):
x = random.randint(0, 350)
y = random.randint(0, 350)
no_button.place(x=x, y=y)
root = tk.Tk()
root.title("Follow me ")
root.geometry("400x400")
question_label = tk.Label(root, text="Are you idiot ?")
question_label.pack(pady=20)
yes_button = tk.Button(root, text="Yes", command=show_popup)
yes_button.pack()
no_button = tk.Button(root, text="No")
no_button.pack()
no_button.bind("", move_button)
root.mainloop()
