summaryrefslogtreecommitdiff
path: root/3689/CH12/EX12.2/12_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '3689/CH12/EX12.2/12_2.sce')
-rw-r--r--3689/CH12/EX12.2/12_2.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/3689/CH12/EX12.2/12_2.sce b/3689/CH12/EX12.2/12_2.sce
new file mode 100644
index 000000000..a6ba80b97
--- /dev/null
+++ b/3689/CH12/EX12.2/12_2.sce
@@ -0,0 +1,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)
+