Files
PythonGames/Кубик.py
2017-02-05 16:38:26 +02:00

1092 lines
1.4 KiB
Python

from tkinter import *
from random import randint
def roll () :
text.delete(0.0, END)
text.insert(END, str(randint(1,6)))
window = Tk()
text = Text(window, width=1, height=1)
buttonA = Button(window, text='Нажми чтобы кинуть!', command=roll)
text.pack()
buttonA.pack()
window.mainloop()