summaryrefslogtreecommitdiff
path: root/291/CH3/EX3.5a/eg3_5a.sce
blob: e3970876015a604507183479ca1e6f3118ff26d9 (plain)
1
2
3
4
5
6
7
white_balls= 6;
black_balls = 5;
total = white_balls + black_balls;
probability_whiteandblack = white_balls*black_balls/(total*(total-1));
probability_blackandwhite = white_balls*black_balls/(total*(total-1));
reqd_probability = probability_whiteandblack + probability_blackandwhite;
disp(reqd_probability, "Thus, the required probability is")