import random
pocetSimulaci = 1000
pocetSamirOOP = 4
pocetOstatnichOOP = 60
pocetGoldu = 72
kolikSamirChybiDoTrojkove = 5
pocetNalezenychSamir = [0,0,0,0,0,0,0,0,0,0]
for x in range(pocetSimulaci):
pocetVsehoOOP = pocetSamirOOP + pocetOstatnichOOP
pocetSamirIP = 18 - pocetSamirOOP
pocetVsehoIP = 13 * 18 - pocetVsehoOOP
pocet = 0
for _ in range(int(pocetGoldu//2*5)):
if pocet == 9:
break
costRoll = random.randrange(1,100)
if costRoll <= 35:
championRoll = random.randrange(1,pocetVsehoIP)
if championRoll <= pocetSamirIP:
pocet += 1
pocetSamirIP -= 1
pocetVsehoIP -= 1
pocetNalezenychSamir[pocet] += 1
for u in range(len(pocetNalezenychSamir)):
print(str(u) + " " + str(pocetNalezenychSamir[u]))
print("")
for u in range(len(pocetNalezenychSamir)):
print(str(u),end = ' ')
for _ in range (200*pocetNalezenychSamir[u]//pocetSimulaci):
print("|",end='')
print("")
soucet = 0
for y in range (kolikSamirChybiDoTrojkove):
soucet += pocetNalezenychSamir[y]
procento = (1 - soucet / pocetSimulaci) * 100
print("Šance na 3* je: " + str(procento) + "%")