Skip to content

Commit 66aaff3

Browse files
authored
Create RandomDice.py
1 parent 77640f6 commit 66aaff3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

RandomDice.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#GGearing 01/10/19
2+
#Random Dice Game using Tkinter
3+
4+
from tkinter import *
5+
from random import randint
6+
def roll():
7+
text.delete(0.0,END)
8+
text.insert(END,str(randint(1,100)))
9+
window=Tk()
10+
text=Text(window,width=3,height=1)
11+
buttonA=Button(window,text="Press to roll!", command=roll)
12+
text.pack()
13+
buttonA.pack()

0 commit comments

Comments
 (0)