A simple Python-based dice rolling simulator.
This project is a basic dice rolling simulator written in Python. It generates a random number between 1 and 6 to simulate the rolling of a six-sided die. Each time the user presses Enter
, the dice rolls and displays the result.
- Simulates a six-sided die.
- Generates random results with each roll.
- Simple and intuitive command-line interface.
To run this script, ensure you have the following installed on your system:
- Python 3
You can download Python from the official website: Python Downloads
-
Clone this repository to your local machine:
git clone https://github.com/godwin-binoy/Dice.git
-
Navigate to the project directory:
cd Dice
-
Run the
Dice.py
script:python Dice.py
-
Press
Enter
to roll the dice. The result will be displayed in the console. -
To exit the program, use
Ctrl+C
or close the terminal window.
The Dice.py
script:
- Imports the
random
module to generate random numbers. - Continuously prompts the user to press
Enter
to roll the dice. - Uses
random.randint(1, 6)
to generate a random integer between 1 and 6. - Displays the result in a simple ASCII representation.
Dice
----
Enter to roll dice :
-----
| 3 |
-----
Enter to roll dice :
-----
| 6 |
-----
Contributions are welcome! Feel free to fork this repository and submit a pull request. Please ensure your changes are well-documented and tested.
This project is licensed under the MIT License. See the LICENSE
file for details.
https://github.com/godwin-binoy