Python Microproject
Python Microproject
MICRO-PROJECT REPORT ON
“Dice roll simulator”
Submitted by
Rohit Burewar (GL). Tushar Nandurkar
Ojas Potdukhe karan Khatarkar
Shivam Atram devanshu Ghosh
Guided by: Ms.Apeksha.B.Bongirwar
Index:
1.Introduction
2.software reqirement
3.Flowchart
4.Source code
5.Output
6.Advantages and disadvantage(only 1)
7. Conclusion
8.References
Submition
This is to declare this Micro Project report has been written by
us. No Part of the report is plagiarized from other sources. All
information included from other sources has been duly
acknowledged. We aware that if any part of the report is found
to be plagiarized. We will take full responsibility for it.
Rohit Burewar . …… … … … … …
Tushar Nandurkar …… … … … … … …. …. …
Ojas Potdukhe. …… … … … … …
Shivam Atram. …… … … … … …
Karan Khatarkar. …… … … … … …
Devanshu Ghosh. …… … … … … …
Introduction:
The Dice is a simple cube shaped like object used in various board games such as snake- ladder, Ludo etc. It is a simple
cube which generates a random number when rolled by a user. A Dice rolling simulator is nothing but a computer
model that can be created by a software program and it functions same as a normal dice in which user rolls a dice and a
random number gets shown on the screen. There are many ways a dice simulator can be implemented. In this paper, we
will implement a GUI Application of dice simulator using in PPython What is Tkinter?
Python has various frameworks/packages which can be used for making GUI applications i.e., the Graphical
User Interface. Tkinter is the standard GUI package for Python. It is the most common, fast, and easy way to create a
GUI (Graphical User Interface) application. It provides a powerful object-oriented interface to the Tk GUI toolkit. We
can develop an application and can use that application on any platform, which reduces the need for additional
requirements required to use an application on any OS like Windows, Mac, or Linux.
Page 1
Software requirement:
• computer system : ( i3-I parfalable RAM> 2 GB)
•Devlopment : python ID
Flowchart:
Page 2
Page 3
Source code:
import random
x = "y"
while x == "y":
if no == 1:
print("[-----]")
print("[ ]")
print("[ 0 ]")
print("[ ]")
print("[-----]") if
no == 2:
Page 4
print("[-----]")
print("[ 0 ]")
print("[ ]")
print("[ 0 ]")
print("[-----]") if
no == 3:
print("[-----]")
print("[ ]")
print("[0 0 0]")
print("[ ]")
print("[-----]") if
no == 4:
print("[-----]")
print("[0 0]")
print("[ ]")
print("[0 0]")
print("[-----]") if
no == 5:
print("[-----]")
print("[0 0]")
print("[ 0 ]")
print("[0 0]")
Page 5
print("[-----]") if
no == 6:
print("[-----]")
print("[0 0 0]")
print("[ ]")
print("[0 0 0]")
print("[-----]")
Output:
Page 6
Advantage and disadvantage
(only1)
The Advantages of Dice Pools
The dice pool offers a number of advantages as a core mechanic, and to
discuss them I am going to get a bit mathy, so consider yourself warned.
The biggest and most immediate advantage is that die pools create a bell
curve. That is, the average roll from a number of dice is going to be the
most likely, with the extreme high and low numbers being the least
likely. For example, the most common numbers to come up on a roll of
5d6 are 17 or 18. The least common are 5 and 30. This means that while
flukes do happen, they are appropriately rare. In a static die system, such
flukes are much more common. Using a single d20 means that a 1 is just
as likely as a 20, or any number in between. The practical effect of this is
that in a dice pool system, characters are less likely to flub a roll they
should be able to pass, or succeed a roll that should be far beyond them.
Conclusion:
Page 7
Yay! We have successfully developed a cool application – Dice Rolling
Simulator in Python. Now, you can just click on a button and get your
next number. Cheers to Python and its package ‘Tkinter’ which supports
functions and makes our work easy. Who would have thought that we
can develop an application by only the ‘random’ function of python? As
of now, we have an understanding of Python, Tkinter, and random
function.
Reference:
https://en.wikipedia.org/wiki/Tkinter
https://www.tutorialspoint.com/python/python_gui_programming.h tm
https://www.w3schools.com/python/ref_random_choice.asp
https://data-flair.training/blogs/dice-rolling-simulator-python/
https://pillow.readthedocs.io/en/stable/reference/ImageTk.html
http://clipart-library.com/dice-faces.html
Page 8