find the percentage of losses and wins from the total ammount of bets import random…
- User
find the percentage of losses and wins from the total ammount of bets
import random import time
class Limbo: def get_multiplier(seed): random.seed(seed) num = round(random.uniform(1.0,100.0), 1) if num <= 5: multi = 1.00 elif num <= 60.5: multi = random.uniform(1.01,2.10) elif num <= 86: multi = random.uniform(2.11,8.00) elif num <= 97.5: multi = random.uniform(8.01,16.00) elif num <= 99: multi = random.uniform(16.01,100.00) elif num <= 99.96: multi = random.uniform(100.01,200.00) elif num <= 100: multi = random.uniform(200.01,5000.00) return round(multi, 2)
testing profitability/fairness
limbo = Limbo
bal = 10000000.0 betamm = 1000 betmulti = 4.00
bets=0 losses=0 wins=0
while bal >= betamm: bal -= betamm bets += 1 multi=limbo.get_multiplier(random.random()) if multi >= betmulti: bal += betamm * betmulti wins += 1 else: bal -= betamm losses += 1 print(“Multi:”, multi, “Bal:”, bal)
print(“Bets:”,bets) print(“Losses:”,losses) print(“Wins”,wins)
- Assistant
To find the percentage of losses and wins from the total amount of bets, you can use the following code:
# Calculate percentages loss_percentage = (losses / bets) * 100 win_percentage = (wins / bets) * 100 # Print percentages print("Loss Percentage:", loss_percentage) print("Win Percentage:", win_percentage)You can add this code at the end of your existing code.