Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def RollDice(diceAmount):
- print('You are now rolling XdY')
- diceAmount()
- diceSides()
- n=Dice
- m=0
- p=0
- while n!=0:
- roll=random.randint(1,int(sides))
- m=m+1
- print('Dice ' +str(m) +': ' +str(roll))
- n=int(n)-1
- p=p+roll
- else:
- print ('The total is ' +str(p))
- def diceAmount():
- print('Input X')
- Dice=input()
- while int(Dice)<1:
- print('Don\'t be an idiot, roll a number of dice')
- Dice=input()
- diceAmount
- def diceSides():
- print('Input Y')
- sides=input()
- while int(sides)<1:
- print('Don\'t be an idiot, dice have to have sides')
- sides=input()
- diceSides
- playAgain='yes'
- while playAgain=='yes' or playAgain=='y':
- RollDice(Dice)
- print('Reroll?')
- playAgain=input()
Advertisement
Add Comment
Please, Sign In to add comment