Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def roll(sides=6):
- return random.randint(1, sides)
- def main():
- sides = 6
- rolling = True
- while rolling:
- roll_again = input('Roll the dice? Yes = Enter, No = Q')
- if roll_again.lower() != 'q':
- print(roll(sides))
- print('did you get what you bet on?')
- else:
- rolling = False
- print('thanks for playing')
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement