summaryrefslogtreecommitdiff
path: root/3689/CH12/EX12.2/12_2.sce
blob: a6ba80b97a139dced932a38e6e3d1c67b0700b63 (plain)
1
2
3
4
5
6
7
8
9
10
11
////
//Variable Declaration
n = 52          //Total cards
nheart = 13     //Number of cards with hearts

//Calculations
Pe = (nheart/n)

//Results
printf("\n Probability of one (heart)card picked from a std. stack of %d cards is %f",n,Pe)