Python script that simulates the rolling of dice. It allows users to choose between rolling one die, two dice, or a customizable number of dice. Each roll displays a visual representation of the dice face(s) rolled and prints the total sum of the rolls. The program runs in a loop until the user decides to exit.
- Roll a single die: The program rolls one die and displays its value.
- Roll two dice: The program rolls two dice, displays their values, and shows the total sum.
- Roll a custom number of dice: The user can specify how many dice they want to roll, and the program will display the values and the total sum.
- Exit the program: The user can exit the program at any time.
- Ensure you have Python installed on your system. This program is compatible with Python 3.
- Clone the repository or download the script.
- Open a terminal or command prompt and navigate to the directory containing the script.
- Run the script using the command:
python dice_rolling_simulator.py
, use compiller or main.exe file.
$ python dice_rolling_simulator.py
Hello! What would you like to do?
a) Roll 1 die
b) Roll 2 dice
c) Roll n dice
d) Exit
Write a, b, c, or d: a
┌─────────┐
│ │
│ ● │
│ │
└─────────┘
You rolled: 1