Python 2
Python 2
EDUCATION
MICRO PROJECT
Academic year 2024-25
TITLE OF PROJECT
Dice roll simulator
1
Teacher Evaluation Sheet
Name of Student: Chaudhari Yash Narayan
Enrolment No: 23651020409
Name of Program: Computer Technology Semester:-VI
Course Title: Programming with Python(PWP) Code: -22616
Title of the Micro Project: Dice Roll Simulator
Sr.
Characteristic to be Poor Average Good Excellent
No.
assessed (Marks 1-3) (Marks 4-5) (Marks 6 - 8) (Marks 9-10)
(A) Process and Product Assesssment (Convert above total marks out of 6 marks)
1 Relevance to the Course
Literature Survey /
2
Information Collection
Completion of the Target as
3
per project proposal
Analysis of data and
4
representation
5 Quality of Prototype / Model
6 Report Preparation
(B) Individual Presentation / Viva (Convert above total marks out of 4 marks)
8 Presentation
9 Viva
Micro – Project Evaluation Sheet:
Process Assessment Product Assessment
Part Project Part Individual Total
A – project Methodology B – Project Presentation / Marks 10
Name of Student Proposal (2 marks) Report / Working Viva (4 marks)
(2 marks) Model(2 marks)
Chaudhari Yash
Comments / Suggestions about team work / leadership / inter – personal communication (if any)
2
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
CERTIFICATE
This is to certify- Chaudhari Yash Narayan
Place: CHANDWAD
Date: / /2024
3
INDEX
Part A
Part B
4
PART A-Plan
A dice roll simulator is a program that mimics the rolling of a physical dice. Users can input the number of
sides on the dice (e.g., 6 for a standard six-sided die) and simulate rolling it. The program then generates a
random number within the specified range to simulate the outcome of the roll. It's commonly used in
games, simulations, and educational activities.
The aim of a "dice roll simulator" project is typically to create a program or application that emulates the
rolling of dice. This can be done for various purposes, such as games, educational simulations, or statistical
analysis. The project involves creating code that generates random numbers within a specified range to
simulate the outcome of rolling one or more dice, and then presenting the result to the user in a user-
friendly format. Additionally, the project may include features such as tracking and displaying statistics,
implementing different types of dice (e.g., six-sided, ten-sided), and allowing customization of the number
of dice rolled.
5
5.0 Resources Required:
3. Books
4. Websites
5. Softwares 1
6
PART B-Plan
7
5.0 Actual Methodology/Procedure Followed:
import tkinter as tk
import random
DIE_FACES = [
"\u2680",
"\u2681",
"\u2682",
"\u2683",
"\u2684",
"\u2685",
]
window = tk.Tk()
window.title("Rolling The Dices Game")
window.geometry("550x350")
window.configure(bg="black")
def roll_dice():
dice1 = random.randint(1, 6)
dice2 = random.randint(1, 6)
label1.config(text=DIE_FACES[dice1 - 1])
label2.config(text=DIE_FACES[dice2 - 1])
roll_button = tk.Button(window, text="Roll", command=roll_dice)
roll_button.pack(pady=50)
window.mainloop()
8
6.0 Output of the Micro-Project:
9
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:
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.
10