Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- from time import sleep
- wins = 0
- losses = 0
- def game_roll():
- global wins
- global losses
- while wins != 3 and losses != 3:
- print("If I roll 55 or below, you win. Good luck!")
- sleep(1)
- print("Rolling!...")
- sleep(2)
- number = random.randint(55, 100)
- print(number)
- if number >= 56:
- print("That sucks! 1 point to the host.")
- losses = losses + 1
- else:
- print("you won this ground!")
- wins = wins + 1
- game_roll()
- def invalid_entry():
- if game_start == "N":
- print("Please type Y once you're ready to play")
- elif game_start != "N":
- print("Please enter a valid character")
- game_start = input("Would you like to play a game of dice? First to 3 wins: Y/N?: ").upper()
- if game_start == "Y":
- game_roll()
- else:
- invalid_entry()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement