Dice Roll Generator Overview This Python script is a efficient and simple dice roll generator that allows you to roll one or two six-sided dice. It prompts the user for the number of dice and then displays the result, including individual values and their total
Usage 1 Run the script in a Python environment. 2 Enter the number of dice you want to roll (1 or 2). 3 The script will simulate the dice roll and display the results.
Features
- Supports rolling one or two dice.
- Clear screen functionality for a better user experience. How to Run Ensure you have Python installed on your machine. Open a terminal or command prompt, navigate to the script's directory, and run the following command:
bash
python dice_roll.py
Example
Number of dice: 2
Rolling the dice...
The values are:
Dice One: 3
Dice Two: 5
Total: 8
Roll Again? y
Notes
- The script efficiently clears the console screen for a cleaner display.
- Input validation ensures that only '1' or '2', as well as their textual representations ('one' or 'two'), are accepted for the number of dice. Feel free to use and modify this script as needed for your projects or entertainment purposes. Happy rollings! 🎲