প্রবাবিলিটি ল্যাব -১ঃ বেসিক প্রবাবিলিটি
def P(favourable_outcome, total_outcome):
p=favourable_outcome/total_outcome
print("Probability is",round(p, 3))favourable_outcome=1
total_outcome=6
P(favourable_outcome, total_outcome)from random import randint
trails= 100
outcomes=[]
for x in range (trails):
outcomes.append(randint(0,1))
head=outcomes.count(0)
tail=outcomes.count(1)
print ("Number of Trails= ", trails)
print ("Head=", head)
print ("Tail=", tail)

Last updated
Was this helpful?