0% found this document useful (0 votes)
5 views

Python Microproject

The document is a micro-project report on a 'Dice Roll Simulator' developed using Python and Tkinter. It includes sections on the introduction, software requirements, flowchart, source code, advantages and disadvantages, conclusion, and references. The project aims to create a GUI application that simulates the rolling of a dice and displays a random number on the screen.

Uploaded by

khantaukirhasan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Python Microproject

The document is a micro-project report on a 'Dice Roll Simulator' developed using Python and Tkinter. It includes sections on the introduction, software requirements, flowchart, source code, advantages and disadvantages, conclusion, and references. The project aims to create a GUI application that simulates the rolling of a dice and displays a random number on the screen.

Uploaded by

khantaukirhasan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

A

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

Computer Engineering Department


Bajaj Chandrapur Polytechnic, Chandrapur
Academic Year 2021 2022

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. …… … … … … …

Guided By:-- Mrs. Apeksha Bongirwar


Head Of Department: Mr. Sunil Wadhai

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)

• Operating system: windows/LLinux

•Devlopment : python ID

Flowchart:

Page 2
Page 3

Source code:
import random

x = "y"

while x == "y":

# Generates a random number


# between 1 and 6 (including
# both 1 and 6) no =
random.randint(1,6)

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("[-----]")

x=input("press y to roll again and n to exit:")


print("\n")

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.

Another major advantage of a dice pool system is that a character’s


abilities are always appropriately relevant. Said abilities determine the
number of dice rolled, and thus will always effect the random number
generated. In the example of a single d20, a low level character may only
add +4 to the roll, while a high level one might add as much as +20. The
low level character’s skill barely effects the roll at all, while the high
level character’s skill is actually more important than the roll itself.

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

You might also like