Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from Tkinter import *
- root = Tk()
- x = 0
- w = Label(root, text="Hello, world!")
- w.pack()
- def callback():
- global x
- x = x + 10
- w.config(text = "Score = "+ str(x))
- button = Button(root, text="QUIT", fg="red", command=root.quit)
- button.pack(side=LEFT)
- work = Button(root, text="Go!", fg="red", command=callback)
- work.pack(side=RIGHT)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement