Maharashtra State Board of Technical Education
Mumbai. (M.S.)
Micro Project
Of
Programming with Python
On
“ Role the Dice Game”
Submitted By
Akshaya Pawar
Shravani Kulkarni
G.S. Mandal’s
Department of Computer Engineering
Marathwada Institute of Technology,
Polytechnic, Chh.Sambhajinagar.
Academic Year: - 2024-2025
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
CERTIFICATE
This is to certify that : -
Roll Enrollment Exam
Name of Student
No. No. Seat No.
14 Akshaya Pawar 2200660141
45 Shravani Kulkarni 2200660190
have successfully completed “Role the Dice Game” Micro-project for the
subject Programming with Python as in the enclosed ‘Portfolio’ during her
tenure of Completing the Diploma in Computer Engineering CO6I in Academic
Year 2024-25 from M.I.T. Polytechnic, Chh.Sambhajinagar with Institute Code
0066.
Date:
Prof. Sana Patel Prof. A.S.Nagrik
Guide H.O.D.
Principal
Marathwada Institute of
Technology, Polytechnic,
Chh.Sambhajinagar
INDEX
Annexure-IV Micro Project Teacher Evaluation Sheet
Annexure-I A “Format for Micro-Project Proposal”
1.0 Aim/Benefits of Micro Project
2.0 Course Outcomes Addressed
3.0 Proposed Methodology
4.0 Action Plan
5.0 Resources required
Annexure-II A “Format for Micro-Project Report”
1.0 Rationale
2.0 Aim/Benefits of Micro Project:
3.0 Course Outcomes Achieved
4.0 Literature Review
5.0 Actual Methodology Followed
6.0 Actual Resources Used
7.0 Outputs of the micro projects
8.0 Skill Developed/Learning outcome of this micro project
9.0 Applications of this micro project
ANNEXURE IV
Micro Project Teacher Evaluation Sheet
Name of the student: Shravani Kulkarni Enrollment no: 2200660190
Name of Program : Diploma in Computer Engineering Semester : - 6th
Course Title : Programming with Python Code: 22616
Title of Micro Project: Role the Dice Game
Course Outcomes Achieved:
1. Develop a python program to demonstrate use of operators.
Sr. Characteristics to be assessed Poor Average Good Excellent Sub
no. (Marks1-3) (Marks 4-5) (Marks 6-8) (Marks 9-10) total
(A) Process and product assessment (cover above total marks out of six marks)
1 Relevance to the course
2 Literature review /Information
collection
3 Completion of target as per
project proposal
4 Analysis of data and
representation
5 Quality of prototype/model
6 Report preparation
(B)individual presentation / viva (convert above total marks out of 4 marks)
7 Presentation
8 Viva
Comments / Suggestions about work:
Signature of Teacher :
Name and Designation : Prof. Sana Patel
of the Teacher
Annexure-I
Micro-Project Proposal
Title of Micro-Project : Role the Dice Game
1.0 Aim/Benefits of Micro Project
The aim of the "Roll the Dice" game is to create an interactive, turn-based game using Python while
implementing key programming concepts like loops, conditionals, and random number generation. This
project enhances coding skills, logical thinking, and understanding of probability. It also improves
problem-solving abilities and provides a fun way to learn Python. Additionally, the game can be
expanded with advanced features, making it a great learning experience for beginners and intermediate
programmers.
2.0 Course Outcomes Addressed
1. Develop a python program to demonstrate use of operators.
3.0 Proposed Methodology
1. Form a Team & Define the Objective – Gather the team and decide on developing a simple
"Roll the Dice" game using Python. Ensure that all members understand the project’s purpose,
which is to create an interactive game that simulates rolling a dice.
2. Set Up the Development Environment – Install and configure Python on the system, ensuring
that necessary libraries (such as random) are available for generating random dice rolls.
3. Define the Game Logic – Outline how the game will function, including player turns,
conditions for winning, and handling cases like rolling a six to get an extra turn.
4. Design the User Interaction – Develop a simple console-based interface where players can
press a key to roll the dice and view the result. Ensure clear prompts and messages for smooth
gameplay.
5. Implement the Core Functionality – Write Python code to handle dice rolling, turn-taking,
winning conditions, and input handling. Use loops and conditional statements to control the flow
of the game.
6. Test for Functionality and Bugs – Run multiple test cases to ensure the dice rolls correctly,
turns switch properly, and the game follows the expected rules without errors.
7. Optimize and Enhance Features – Improve the game by refining logic, handling edge cases
(such as incorrect inputs), and possibly adding additional features like a graphical interface or
sound effects.
8. Document the Process – Write a step-by-step guide explaining the game logic, code structure,
and user instructions to ensure clarity for future improvements or modifications.
9. Compile the Final Report – Gather all findings, code documentation, screenshots, and test
results into a final report to present a complete and organized project.
4.0 Action Plan
Sr. Details of Activity Planned Planned Name of
No Start Date Finish Date Responsible
Team Members
1 Select the project topic and 21/01/2025 21/01/2025 All Members
define objectives
2 Gather requirements and 22/01/2025 31/01/2025 All Members
define game logic
3 Research Python, 05/02/2025 All Members
randomization, and game 01/02/2025
development techniques
4 Design game rules and 06/02/2025 08/02/2025 All Members
flowchart
5 Implement game-winning 21/02/2025 25/02/2025 All Members
logic and replay functionality
6 Design a simple user 26/02/2025 03/03/2025 All Members
interface for the game (if
applicable)
7 Test game functionality and 04/03/2025 05/03/2025 All Members
debug issues
8 Review and finalize the 06/03/2025 06/03/2025 All Members
project with feedback
9 Prepare project report and 07/03/2025 11/03/2025 All Members
documentation
5.0 Resources required
Sr. Name of Resource/Material Specification Qty. Remarks
No
1 Computer system 16 GB RAM, 1
Windows 11 OS
2 IDE PyCharm 1
3 Textbook/Manual 1
PWP
Names of Team Members with Roll No. : -
Roll No. Name of Student
14 Akshaya Pawar
45 Shravani Kulkarni
Annexure-II
Micro-Project Report
Title of Micro-Project : - Role the Dice Game.
1.0 Rationale
The "Roll the Dice" game is designed to provide an engaging and interactive way to learn Python
programming while reinforcing key concepts such as loops, conditionals, and random number
generation. The game introduces players to probability and randomness, making it both educational and
entertaining. It enhances logical thinking and problem-solving skills by requiring structured game logic
and fair turn-taking. Additionally, the project allows for easy expansion, enabling developers to add
features like score tracking or a graphical user interface. By implementing user interaction and input
handling, the game serves as a practical introduction to interactive programming. Overall, this project
follows a structured workflow, helping learners understand software development from planning to
execution while encouraging creativity and teamwork.
2.0 Aim/Benefits of Micro Project:
The aim of the "Roll the Dice" game is to create an interactive, turn-based game using Python while
implementing key programming concepts like loops, conditionals, and random number generation. This
project enhances coding skills, logical thinking, and understanding of probability. It also improves
problem-solving abilities and provides a fun way to learn Python. Additionally, the game can be
expanded with advanced features, making it a great learning experience for beginners and intermediate
programmers.
3.0 Course Outcomes Achieved
1. Develop a python program to demonstrate use of operators.
4.0 Literature Review :
The "Roll the Dice" game is a simple yet effective way to introduce programming concepts in Python.
This literature review explores the fundamental concepts, challenges, and best practices associated with
developing a dice-rolling game, highlighting its significance in programming education and game
development.
Fundamental Concepts
Python provides an intuitive and beginner-friendly environment for game development, making it an
ideal choice for creating a turn-based dice-rolling game. The core components of this game include:
Random Number Generation: The random module in Python allows developers to generate
dice rolls, simulating real-world randomness. The random.randint(1,6) function is commonly
used to generate numbers between 1 and 6, mimicking a six-sided die (Lutz, 2019).
Loops and Conditional Statements: The game relies on loops to manage player turns and
conditional statements to determine outcomes, such as re-rolling on a six or declaring a winner.
These are essential control flow structures in Python (Guttag, 2021).
User Input Handling: The game requires players to interact by pressing a key to roll the dice.
Input handling is crucial to ensure smooth gameplay and prevent errors (Zelle, 2016).
Challenges in Game Development
While developing a simple dice game may seem straightforward, several challenges must be addressed:
Game Logic Implementation: Ensuring fair turn-taking and correctly handling special
conditions, such as rolling a six, requires well-structured logic. Poorly implemented conditions
may lead to infinite loops or incorrect turn sequences (McKinney, 2020).
Randomness and Probability: Since dice rolling is based on probability, developers must
ensure that the random number generation is fair and unbiased, avoiding patterns that could
affect gameplay fairness (Van Rossum, 2011).
User Experience and Interaction: A well-designed user interface, even if text-based, should
provide clear instructions and feedback. Players should understand when it is their turn and
whether they need to roll again (Nielsen, 1993).
Best Practices for Game Development
To address these challenges and ensure a smooth gaming experience, developers should follow key best
practices:
Modular Code Design: Writing modular functions, such as a dedicated function for rolling the
dice, makes the code more readable and maintainable (Lutz, 2019).
Error Handling: Proper input validation and error handling prevent unexpected crashes,
ensuring the game does not break due to invalid inputs (Zelle, 2016).
Enhancements and Expansion: The game can be expanded with features such as score
tracking, multiplayer modes, or a graphical interface using tkinter or pygame to improve
engagement (Sweigart, 2015).
Security Considerations
Although a simple dice game has minimal security concerns, handling user inputs properly is
important to prevent unexpected behavior. If expanded to an online multiplayer version, developers
would need to address issues like data validation, fair play, and potential cheating mechanisms
(Van Rossum, 2011).
Conclusion
The "Roll the Dice" game serves as a practical project for learning Python, covering essential
programming concepts such as randomness, loops, conditionals, and user interaction. While seemingly
simple, it provides valuable insights into game logic, user experience, and modular coding practices. By
following best practices and considering potential challenges, developers can build an engaging and
well-structured game that serves as a foundation for more advanced projects.
Helpful Resources for Learning Python and Game Development
The following online resources provide in-depth tutorials and explanations for Python programming
and game development:
Python Basics and Programming Concepts:
o W3Schools Python Tutorial – Covers Python basics, loops, conditionals, and functions.
o Python Official Documentation – The official guide to Python programming.
Game Development with Python:
o Real Python: Game Development with Python – A tutorial on creating simple games in
Python.
oPygame Documentation – Guide for developing graphical games in Python.
Random Number Generation and Probability in Python:
o GeeksforGeeks Random Module – Explains how to generate random numbers in Python.
o Programiz Random Numbers – Covers Python's random module and its functions.
By leveraging these resources, developers can gain a deeper understanding of Python programming and
enhance their skills in game development.
5.0 Actual Methodology Followed
1. Setting Up the Environment
Installed Python from python.org.
Used a code editor (VS Code/PyCharm/IDLE).
2. Designing Game Logic
Defined rules: Players roll a die, a first roll of 6 allows a second chance, and rolling another 6
wins the game.
Implemented turn-based system using loops and conditions.
3. Writing the Code
Used random.randint(1,6) for dice rolls.
Implemented while loop and if-else conditions for game flow.
Used input() for user interaction.
4. Testing the Game
Checked dice rolls (values between 1-6).
Verified correct turn handling and win conditions.
Fixed any logical errors or infinite loops.
5. Refining & Enhancements
Improved player messages and instructions.
Added a round completion message.
Considered future enhancements (e.g., GUI with Tkinter/Pygame).
6. Final Testing & Execution
Conducted final game tests.
Shared with others for feedback.
Confirmed proper game logic and finalized the project. ✅
7. Creating the Project Report
Introduction – Explained the project objective and game rules.
Methodology – Documented the step-by-step development process.
Code Explanation – Included key code snippets with explanations.
Testing & Results – Described test cases, outputs, and fixes.
Conclusion – Summarized the project outcomes and possible improvements.
References – Added useful links for learning Python (W3Schools, GeeksforGeeks).
6.0 Actual Resources Used
Sr. Name of Resource/Material Specification Qty. Remarks
No
1 Computer system 16 GB RAM, 1
Windows 11 OS
2 IDE PyCharm 1
3 Textbook/Manual PWP 1
7.0 Outputs of the micro projects:-
8.0 Skill Developed/Learning outcome of this micro project:-
Python Programming – Improved coding skills by implementing loops, conditional statements, and
user input handling.
Randomization & Logic Building – Learned to use the random module to generate unpredictable
dice rolls and design logical game flow.
Problem-Solving & Debugging – Developed skills in identifying and fixing errors, handling
infinite loops, and optimizing code.
User Interaction & Input Handling – Gained experience in creating interactive console-based
programs with user-friendly prompts.
Algorithm Development – Understood how to design step-by-step logic for turn-based games.
Testing & Validation – Tested different game scenarios to ensure correct functionality and fair
gameplay.
Report Writing – Learned how to document a project, explain code, and present findings in a
structured format.
Project Management – Developed time management and teamwork skills while completing the
project efficiently.
9.0 Applications of this micro project : -
Educational Purposes – Helps beginners understand Python programming, loops, conditional
statements, and randomization.
Game Development – Forms the foundation for creating dice-based games, board games (like
Ludo or Snakes & Ladders), and casino-style games.
Simulation & Probability Studies – Can be used to study probability distributions and randomness
in mathematical or statistical experiments.
AI & Machine Learning – Helps in developing AI strategies for game-playing bots by simulating
dice rolls and decision-making logic.
Entertainment & Leisure – Can be expanded into a fun, multiplayer game for personal enjoyment
or party games.
Programming Skill Enhancement – Strengthens logical thinking, debugging skills, and coding
efficiency for beginners and intermediate programmers.
Software Development Practice – Encourages structured project development, testing, and
documentation in software engineering.
*********