Skip to content

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.

License

Notifications You must be signed in to change notification settings

TheNazgul42/Dice_Rolling_Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dice Rolling Simulator

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.

Features

  1. Roll a single die: The program rolls one die and displays its value.
  2. Roll two dice: The program rolls two dice, displays their values, and shows the total sum.
  3. 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.
  4. Exit the program: The user can exit the program at any time.

How to Run

  1. Ensure you have Python installed on your system. This program is compatible with Python 3.
  2. Clone the repository or download the script.
  3. Open a terminal or command prompt and navigate to the directory containing the script.
  4. Run the script using the command: python dice_rolling_simulator.py, use compiller or main.exe file.

Example Usage

$ 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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Languages