Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import os
- class Roller:
- def roll6():
- print(random.randint(1,6))
- def rollSel():
- big = True
- while big==True:
- try:
- os.system("cls")
- big=float(input("How big is this die?"))
- except:
- os.system("cls")
- print("Woops,", big, "isn't a number!, please type a number next time")
- big=True
- input()
- else:
- os.system("cls")
- print("You rolled a",random.randint(1,big),"on a",big,"sided die!")
- finally:
- choice=input("Would you like to roll another die? (y/n)")
- if choice=="n" or choice=="N" or choice=="no":
- big=False
- else:
- big=True
- #Roller.roll6()
- Roller.rollSel()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement