A Dice Simulator created in Python using its famous packages Tkinter and random. It inputs the number of dices to be rolled by and outputs the results of all the dices being rolled randomly.
This Dice Simulator is written using Python. It inputs the number of dices that need to be rolled by the user and outputs the results of those number of dices in a label.
The packages used in this program is Random which is used to get a random integer between 1 and 6.
The Tkinter package is used to give the simulator a GUI.(makes it good looking)
In this, the input is taken through an Entry widget of the Tkinter package and then an empty list is initialized called 'diceoutputs' which is used to store all the outputs of all the dices being rolled. The output is then shown using a Label.
randint() function is used to get random numbers between 1 and 6. The output is then stored in a diceOutputs list.
Submitted by ARTHRAJ RATHORE (Arthraj)
Download packets of source code on Coders Packet
Comments