Advertisement
GlitchyChas

Dice in Python

May 26th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. import random
  2.  
  3. dice_numbers = ["1", "2", "3", "4", "5", "6"]
  4. how_many_numbers = len(dice_numbers)
  5. print("Rolling dice...")
  6. which_number = random.randint(0,how_many_numbers-1)
  7. print ("Dice Rolled", dice_numbers[which_number])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement