Skip to content

Instantly share code, notes, and snippets.

@jryebread
Created March 18, 2017 04:01
Show Gist options
  • Save jryebread/3a83ffc23decb6e00055830bf0664bfe to your computer and use it in GitHub Desktop.
Save jryebread/3a83ffc23decb6e00055830bf0664bfe to your computer and use it in GitHub Desktop.
from random import randint
loop = True
bankValue = 40.00
while (loop == True):
print (bankValue)
print("Please enter your guess for the next roll")
print("It only costs $2.00 to play. If you ar ecorrect I will pay u 2")
realNum = randint(0, 6)
guessNum = input("Guess Number: ")
bankValue -= 2
if guessNum == realNum:
bankValue += 20
print("winner! The dice rolled a %s. Continue?" %realNum)
else:
print("Sorry, the dice rolled a %s , Continue?" %realNum)
Continue = input(' ')
if Continue == 'n':
loop = False
break
print("See ya later!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment