Hi,
I need some help to understand why my app is failing. Not an expert on random.
I’m getting very different results from my computer to rpl.it.
My comp is always around 0.27 and rpl.it is 0.17. but I have no idea how to improve those results.
This is my code:>
def draw(self, numero): cantidad = self.bolasTotales - numero if (cantidad < 0): return self.contents bolas = [] for i in range(numero): indice = random.randint(0, len(self.contents)-1) bola = self.contents.pop(indice) bolas.append(bola) return bolas
Full code>
https://repl.it/join/hhgidbla-robertogimenez
Ideas welcome.
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0
.
Challenge: Probability Calculator
Link to the challenge: