Advertisement
Ypleitez

Untitled

Nov 10th, 2023
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. import random
  2.  
  3. def apuesta(balance, base_bet):
  4. chance = 90
  5. bet_amount = balance / 1000000
  6.  
  7. for _ in range(10):
  8. random_chance = random.randint(1, 100)
  9. if random_chance <= chance:
  10. # Gana
  11. print(f'Ganaste {bet_amount} unidades.')
  12. break
  13. else:
  14. # Pierde
  15. print(f'Perdiste {bet_amount} unidades.')
  16. if _ < 5:
  17. base_bet *= 10 # Incrementa la base bet para la max bet
  18. else:
  19. losses = 0
  20. for j in range(5):
  21. random_chance = random.randint(1, 100)
  22. if random_chance > chance:
  23. losses += 1
  24. if losses >= 2:
  25. base_bet *= 10 # Incrementa la base bet para la max bet
  26. bet_amount = base_bet
  27.  
  28. # Ejemplo de uso
  29. balance = 1000000 # Puedes ajustar esto según tu saldo inicial
  30. base_bet = balance / 1000000
  31.  
  32. apuesta(balance, base_bet)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement