diff options
Diffstat (limited to '2882/CH1/EX1.1')
-rwxr-xr-x | 2882/CH1/EX1.1/Ex1_1.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/2882/CH1/EX1.1/Ex1_1.sce b/2882/CH1/EX1.1/Ex1_1.sce new file mode 100755 index 000000000..e5236cb18 --- /dev/null +++ b/2882/CH1/EX1.1/Ex1_1.sce @@ -0,0 +1,22 @@ +//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 8
+clear;
+clc;
+
+//Given Data
+
+//Colour coding of four band resistor
+//Given Sequence: [Gray Red Red Gold]
+gray=8;
+red=2;
+gold=0.05;
+
+//Solution
+
+R=(gray*10+red)*(10^(red));//Base resistance in ohms
+R_min=R*(1-0.05);//Least possible resistance in ohms using variance
+R_max=R*(1+0.05);//Most possible resistance in ohms using variance
+
+printf("Resistance should be in between %d ohms and %d ohms",R_min,R_max);
+//Error in textbook as 5% of 8200 is 410 and not 41
+
|