I'm kinda new to python and I would appreciate your help :) I have the following code :
import random
x = 1
def round():
return random.randint(1,6)
for i in range(8):
result = round()
if result > x:
x = result
if x == 5:
print "True"
The goal is to calculate the probability of the program to print "True", The probability should be 0.193. What would be the most effective way with maximum efficiency to do it? I thought about something related to bernoulli distribution and tried but my result was wrong. Thanks!