Dice Rolling Simulator SHRINATH
Dice Rolling Simulator SHRINATH
“Guess Number”
Submitted by
Prof. K.A.Margaje
Rajgad Dnyanpeeth’s
SHRI CHHATRAPATI SHIVAJIRAJE COLLEGE OF
ENGINEERING
S. No. 237, Satara-Pune, NH-4, Dhangawadi, Tal: Bhor, Dist: Pune
Rajgad Dnyanpeeth’s
SHRI CHHATRAPATI SHIVAJIRAJE COLLEGE OF
ENGINEERING
S. No. 237, Satara-Pune, NH-4, Dhangawadi, Tal: Bhor, Dist: Pune
CERTIFICATE
This is to certify that the “Mini Project Report” submitted By Mr.Shingade Srinath
sharad “ Guess Number: work done by him and
2025 academic year, in partial fulfillment of the requirements for the award of the degree
of
Bachelor of Engineering in computer Engineering, at Rajgad Dnyaneepth’s Shri
Chhatrapati Shivajiraje College of Engineering, Dhangwadi, Pune.
TABLE OF CONTENTS
Title
Sr No. Page No.
Introduction
1 05 -06
Result
3 10-12
Conclusion
4 13
Reference
5 14
4|Page
ACKNOWLEDGEMENT
It gives us an immense pleasure to express our gratitude and thanks to all those who
helped in the timely completion of the seminar work.We have a great pleasure in expressing
our deep sense of gratitude and indebtedness to Prof.K.A.Margaje Guide for their invaluable
guidance, constant supervision and sustained encouragement throughout the tenure in this
dissertation work.We would like to express our thanks to, Prof.J.G.kale, Head of Department,
Department of Computer Engineering, Shree Chhatrapati Shivajiraje College of Engineering,
Pune for their constant support and encouragement.We would like to express our thanks to
Prof. Dr. S. B. Patil Principal, Shree Chhatrapati Shivajiraje College of Engineering, Pune for
permitting us to take up the project work.We are thankful of our parent and friends for their
kind help and support throughout the course.
INTRODUCTION
Software Requirements:
Python 3.x or higher
IDE or text editor (e.g., VS Code, PyCharm, Sublime Text)
Operating System: Any (Windows, macOS, Linux)
Hardware Requirements:
A computer or device capable of running Python code
At least 2 GB of RAM (minimum requirement for Python-based
applications)
Processor: Any modern CPU (Intel or AMD)
Model Description and Design
Step-by-Step Description of the Model - Algorithm
Generate Random Number:
The program will generate a random number between a specified range (e.g., 1 to 100).
User Input:
The program will prompt the user to guess the number.
The user will input their guess as a string.
Input Validation:
Check if the input is a valid number (integer).
If the input is invalid, display an error message and prompt the user again.
Comparison:
Compare the user's guess to the randomly generated number.
If the guess is too low, display "Too low!".
If the guess is too high, display "Too high!".
If the guess is correct, display "Congratulations! You've guessed the correct number!"
and end the game.
Repeat:
The process continues until the user guesses the correct number.
End Game:
Once the user guesses the correct number, the game ends.
…
Architecture of Model
User Input Layer: The layer where the user interacts with the game
(inputting guesses).
Processing Layer: Where the program validates the input, compares
the guess with the random number, and determines the feedback.
Output Layer: Displays feedback to the user after each guess
(whether it's too low, too high, or correct).
Code
Copy code
import random
def is_valid_number(input_value):
try:
num = int(input_value)
return True
except ValueError:
return False
else:
def guess_number():
# Randomly generate a number between 1 and 100
guessed_correctly = False
print("I have chosen a number between 1 and 100. Try to guess it!")
if is_valid_number(user_input):
user_guess = int(user_input)
print(feedback)
if user_guess == target_number:
guessed_correctly = True
else:
.
Flowchart
Below is the flowchart for the "Guess Number" game:
mathematica
Copy code
Start
|
Generate Random Number
|
Ask for User Input (Guess)
|
Is Input a Valid Number? ---- No ----> Display "Invalid
input. Try again."
|
Yes
|
Compare Guess with Random Number
|
Is Guess Too Low? ---- Yes ----> Display "Too low!"
|
Is Guess Too High? ---- Yes ----> Display "Too high!"
|
Guess Correct? ---- Yes ----> Display "Congratulations!" and
end the game
|
Repea
References
Python Documentation: https://docs.python.org/3/
Python's random module: https://docs.python.org/3/library/random.html
Stack Overflow discussions on handling input validation:
https://stackoverflow.com/
ag
R ajgad Dnyanpeeth’s
SHRI CHHATRAPATI SHIVAJIRAJE COLLEGE OF
ENGINEERING
S. No. 237, Satara-Pune, NH-4, Dhangawadi, Tal: Bhor, Dist:
Pune
CERTIFICATE
11 | P e
Rajgad Dnyanpeeth’s
SHRI CHHATRAPATI SHIVAJIRAJE COLLEGE OF
ENGINEERING
S. No. 237, Satara-Pune, NH-4, Dhangawadi, Tal: Bhor, Dist: Pune
CERTIFICATE
This is to certify that the “Mini Project Report” submitted By Mr.Shinde Sujal Sunil
“ Guess Number: work done by him and
2025 academic year, in partial fulfillment of the requirements for the award of the
degree of
Bachelor of Engineering in computer Engineering, at Rajgad Dnyaneepth’s Shri
Chhatrapati Shivajiraje College of Engineering, Dhangwadi, Pune.
R ajgad Dnyanpeeth’s
SHRI CHHATRAPATI SHIVAJIRAJE COLLEGE OF
ENGINEERING
14 | P a g e
S. No. 237, Satara-Pune, NH-4, Dhangawadi, Tal: Bhor, Dist: Pune
CERTIFICATE
This is to certify that the “Mini Project Report” submitted By Mr.Shinde Yuvraj
Sadashiv “ Guess Number: work done by him and
2025 academic year, in partial fulfillment of the requirements for the award of the
degree of
Bachelor of Engineering in computer Engineering, at Rajgad Dnyaneepth’s Shri
Chhatrapati Shivajiraje College of Engineering, Dhangwadi, Pune.
Output
mathematica
Copy code
Welcome to the Guess the Number game!
I have chosen a number between 1 and 100. Try to guess it!
Enter your guess: 50
Too high!
Enter your guess: 30
14 | P a g e
Too low!
Enter your guess: 40
Too high!
Enter your guess: 35
Congratulations! You've guessed the correct number!
Conclusion
The "Guess Number" game effectively implements basic programming
, concepts such as loops, input validation, random number generation, and
condition-based comparisons. By following a simple design and
using .Python's built-in functions, the program allows users to play an
interactive .guessing game
14 | P a g e
14 | P a g e