Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import * #Import every function from tkinter
- from random import randint
- def throw():
- text.delete(0.0, END)
- text.insert(END, str(randint(1, 6)))
- window = Tk()
- text = Text(window, width=1, height=1)
- button1 = Button(window, text="Click to throw", command=throw)
- #Add the variables to the window.
- text.pack()
- button1.pack()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement