/
rnekrasov
/
Python
Обзор
Документация
Войти
/
rnekrasov
/
Python
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
RandomDice.py
20 строк
524 B
slowy07
refactor: clean code
30 янв 2022, 04:33
30 янв 2022, 04:33
f0af0c4
Код
Авторство
О чём код?
# GGearing 01/10/19 # Random Dice Game using Tkinter # Tkinter is used for Making Using GUI in Python Program! # randint provides you with a random number within your given range! from random import randint from tkinter import * # Function to rool the dice def roll(): text.delete(0.0, END) text.insert(END, str(randint(1, 100))) # Defining our GUI window = Tk() text = Text(window, width=3, height=1) buttonA = Button(window, text="Press to roll!", command=roll) text.pack() buttonA.pack() # End Of The Program!