summaryrefslogtreecommitdiff
path: root/1553/CH31/EX31.1/31Ex1.sce
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH31/EX31.1/31Ex1.sce')
-rw-r--r--1553/CH31/EX31.1/31Ex1.sce10
1 files changed, 10 insertions, 0 deletions
diff --git a/1553/CH31/EX31.1/31Ex1.sce b/1553/CH31/EX31.1/31Ex1.sce
new file mode 100644
index 000000000..62134d567
--- /dev/null
+++ b/1553/CH31/EX31.1/31Ex1.sce
@@ -0,0 +1,10 @@
+//chapter 31 Ex 1
+
+clc;
+clear;
+close;
+S={'H','T'};
+E={'H'};
+sizeS=size(S,"c"); sizeE=size(E,"c");
+prob=sizeE/sizeS;
+printf("The probability of getting a head is %0.2f",prob);