Created
March 16, 2015 22:48
-
-
Save bentrevett/2a030b140c9077a59a57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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