Skip to content

Instantly share code, notes, and snippets.

@bentrevett
Created March 16, 2015 22:48
Show Gist options
  • Save bentrevett/2a030b140c9077a59a57 to your computer and use it in GitHub Desktop.
Save bentrevett/2a030b140c9077a59a57 to your computer and use it in GitHub Desktop.
import random
def roll_dice(number,sides):
for i in range(0,number):
rolled = random.randint(1,sides)
print("You rolled {}!".format(rolled))
while True:
number = int(input("How many dice do you want to roll? "))
sides = int(input("How many sides on each dice? "))
roll_dice(number,sides)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment