A simple Python program that simulates rolling a dice. Each roll randomly generates a number from 1 to 6 and prints a visual representation of the dice.
- Generates a random number between 1 and 6
- Prints a simple dice face for the rolled number
- Option to roll again as many times as you like
Make sure you have Python 3.x installed on your system.
You can download it from Python official website.
# Step 1: Clone the repository
git clone https://github.com/Shahrayar123/Python-Projects.git
# Step 2: Navigate to the dice simulator folder
cd Python-Projects/dice-simulator
# Step 3: (Optional) Install numpy if you want to use it instead of Python's built-in random module
pip install numpy
# Step 4: (Optional) Check Python version to ensure Python 3.x is installed
python --version
# or
python3 --version
# Step 5: Run the program
python dice.py
# or, if your system uses python3
python3 dice.py
# Step 6: Playing the game
# After running dice.py, the program will prompt:
# "Do you want to play again (y/n):"
# Step 7: Rolling the dice
# Press 'y' to roll the dice again.
# Press 'n' to exit the program.
# Each roll will display a visual dice face representing the number rolled.
# You can roll as many times as you like by typing 'y'.