Untitled
unknown
plain_text
6 months ago
986 B
2
Indexable
import tkinter as tk import random import pygame # Initialize pygame for sound pygame.init() # Load sound effects sound_effect = pygame.mixer.Sound('path_to_your_sound_file.wav') # Function to simulate a prank payment def simulate_payment(): amount = random.randint(1, 1000) message = f"You've sent ₹{amount} for the funniest joke ever!" payment_label.config(text=message) sound_effect.play() # Play the sound effect # Create the main window root = tk.Tk() root.title("Prank Payment App") # Create UI elements header = tk.Label(root, text="Prank Payment App", font=("Helvetica", 16)) header.pack(pady=20) payment_label = tk.Label(root, text="", font=("Helvetica", 14)) payment_label.pack(pady=10) pay_button = tk.Button(root, text="Send Prank Payment", command=simulate_payment) pay_button.pack(pady=20) exit_button = tk.Button(root, text="Exit", command=root.quit) exit_button.pack(pady=10) # Run the app root.mainloop()
Editor is loading...
Leave a Comment