Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python code:
- button = 0
- def button_up(btn):
- btn = btn + 1
- return (btn)
- import tkinter as tk
- root = tk.Tk()
- root.title("Click Game!")
- root.maxsize(300,300)
- root.minsize(300,300)
- button1 = tk.Button(root, text="Click me!", command=button_up(button))
- button1.pack()
- label1 = tk.Label(root, text="Click Counter: ")
- label1.pack()
- label2 = tk.Label(root, text=str(button))
- label2.pack()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement