SHARE
TWEET

Untitled

a guest Feb 18th, 2020 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2.  
  3. def flip(dinero):
  4.     num = random.randint(1,2)
  5.     if num == 1:
  6.                 print("Has ganado 10")
  7.                 return dinero + 10  
  8.     else:
  9.                 print("Has perdido 10")            
  10.                 return dinero - 10
  11.  
  12. dinero_inicial = 100
  13.  
  14. def menu(dinero):
  15.  
  16.     print("Bienvenido al casino")
  17.     print("Usted tiene",dinero)
  18.     print("1 para jugar a voltear una moneda")
  19.  
  20.     x = int(input("Que desea jugar? \n"))
  21.  
  22.     if (x==1):
  23.         money = flip(dinero)
  24.         return money
  25.  
  26. while True:
  27.     dinero_inicial = menu(dinero_inicial)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top