This is a simple Python program that simulates rolling a 6-sided dice.
- Clone or download the repository to your local machine.
- Ensure you have Python installed.
- Navigate to the directory where the script is located.
- Run the script using the command
python dice_roller.py. - Follow the on-screen instructions:
- Choose option 1 to roll the dice.
- Choose option 2 to exit the program.
The script consists of two main functions:
-
roll_dice(): This function generates a random number between 1 and 6, simulating the roll of a dice, and prints the result. -
main(): This function presents a menu to the user with two options:- Option 1: Roll the dice.
- Option 2: Exit the program.
It then takes user input and calls the appropriate function based on the choice made.
This script requires Python to be installed on your system. It also uses the random module, which is a standard library in Python and does not require any additional installation.
Contributions are welcome! If you find any bugs or have suggestions for improvement, please open an issue or create a pull request on the GitHub repository.