Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Advanced Dice Rolling Simulator in Python

This is an advanced dice rolling simulator in Python that allows users to roll multiple dice with different numbers of sides and modifiers. The program uses the random module in Python to generate random numbers and simulate rolling the dice.

Requirements Python 3.5 or above

How to use Download or clone this repository to your local machine. Open the terminal/command prompt and navigate to the directory containing the dice_roller.py file. Run the dice_roller.py file using the command python dice_roller.py. Enter the number of dice you want to roll and the number of sides each die has, separated by a space. For example, if you want to roll 3 six-sided dice, type 3 6 and press enter. If you want to add a modifier to the roll, enter a + or - sign followed by the modifier value. For example, if you want to add a +2 modifier to the roll, type +2 and press enter. If you want to add a -1 modifier to the roll, type -1 and press enter. The program will display the result of each roll and the total sum of all the rolls, including the modifier. Example Here is an example of how to use the program:

$ python dice_roller.py Enter the number of dice and the number of sides, separated by a space: 3 6 Do you want to add a modifier? (y/n) y Enter the modifier value: +2 Rolling 3 dice with 6 sides each, with a +2 modifier... Roll 1: 5 Roll 2: 3 Roll 3: 6 Total: 16

In this example, the user rolled 3 six-sided dice with a +2 modifier. The program displayed the result of each roll and the total sum of all the rolls, including the modifier.