Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Simulation of Dice Roll

  • Mohammed Anzil Pallivalappil
  • 2023-06-12
  • 8
Simulation of Dice Roll
Dice RollPythonSimulation
  • ok logo

Скачать Simulation of Dice Roll бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Simulation of Dice Roll или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Simulation of Dice Roll бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Simulation of Dice Roll

This is a video that simulates the rolling of a dice.
Hope this is helpful.
The code has been given below
Importing tkinter and random modules
from tkinter import *
import random

Creating a window
window = Tk()

Setting background colour of the window
window.configure(bg="black")

Setting geometry of the window
window.geometry("550x350")

Setting title of the window
window.title("Rolling The Dices Game")

Preventing maximizing of the window
window.resizable(0, 0)

Creating function to roll the dices
def roll_dices():
These values indicate dots on the dices.
For eg: \u2680 corresponds to 1 dot,
\u2681 corresponds to 2 dots etc.
dice_dots = ['\u2680', '\u2681',
'\u2682', '\u2683',
'\u2684', '\u2685']
Generating random dots on the dices
label.configure(
text=f'{random.choice(dice_dots)}{random.choice(dice_dots)}')
label.pack()


Adding button to roll the dices
roll_button = Button(window, text="Roll!",
width=10, height=2,
font=15, bg="aqua",
bd=2, command=roll_dices)
Setting the position of the button
roll_button.pack(padx=10, pady=15)

Adding Label
label = Label(window, font=("times", 250),
bg="black", fg="yellow")

window.mainloop()

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]