From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1529/CH2/EX2.1/2_01.sce | 6 ++++++ 1529/CH2/EX2.10/2_10.sce | 6 ++++++ 1529/CH2/EX2.11/2_11.sce | 8 ++++++++ 1529/CH2/EX2.12/2_12.sce | 8 ++++++++ 1529/CH2/EX2.13/2_13.sce | 7 +++++++ 1529/CH2/EX2.14/2_14.sce | 11 +++++++++++ 1529/CH2/EX2.15/2_15.sce | 7 +++++++ 1529/CH2/EX2.16/2_16.sce | 9 +++++++++ 1529/CH2/EX2.18/2_18.sce | 14 ++++++++++++++ 1529/CH2/EX2.19/2_19.sce | 18 ++++++++++++++++++ 1529/CH2/EX2.2/2_02.sce | 6 ++++++ 1529/CH2/EX2.20/2_20.sce | 13 +++++++++++++ 1529/CH2/EX2.3/2_03.sce | 6 ++++++ 1529/CH2/EX2.4/2_04.sce | 6 ++++++ 1529/CH2/EX2.5/2_05.sce | 6 ++++++ 1529/CH2/EX2.6/2_06.sce | 9 +++++++++ 1529/CH2/EX2.7/2_07.sce | 9 +++++++++ 1529/CH2/EX2.8/2_08.sce | 10 ++++++++++ 1529/CH2/EX2.9/2_09.sce | 8 ++++++++ 19 files changed, 167 insertions(+) create mode 100755 1529/CH2/EX2.1/2_01.sce create mode 100755 1529/CH2/EX2.10/2_10.sce create mode 100755 1529/CH2/EX2.11/2_11.sce create mode 100755 1529/CH2/EX2.12/2_12.sce create mode 100755 1529/CH2/EX2.13/2_13.sce create mode 100755 1529/CH2/EX2.14/2_14.sce create mode 100755 1529/CH2/EX2.15/2_15.sce create mode 100755 1529/CH2/EX2.16/2_16.sce create mode 100755 1529/CH2/EX2.18/2_18.sce create mode 100755 1529/CH2/EX2.19/2_19.sce create mode 100755 1529/CH2/EX2.2/2_02.sce create mode 100755 1529/CH2/EX2.20/2_20.sce create mode 100755 1529/CH2/EX2.3/2_03.sce create mode 100755 1529/CH2/EX2.4/2_04.sce create mode 100755 1529/CH2/EX2.5/2_05.sce create mode 100755 1529/CH2/EX2.6/2_06.sce create mode 100755 1529/CH2/EX2.7/2_07.sce create mode 100755 1529/CH2/EX2.8/2_08.sce create mode 100755 1529/CH2/EX2.9/2_09.sce (limited to '1529/CH2') diff --git a/1529/CH2/EX2.1/2_01.sce b/1529/CH2/EX2.1/2_01.sce new file mode 100755 index 000000000..010fc1930 --- /dev/null +++ b/1529/CH2/EX2.1/2_01.sce @@ -0,0 +1,6 @@ +//Chapter 2, Problem 1 +clc; +Q=0.24; //Charge in coulombs +T=15*10^-3; //Time converted in seconds +I=Q/T; //Calculating current +printf("Current flows = %f A",I); diff --git a/1529/CH2/EX2.10/2_10.sce b/1529/CH2/EX2.10/2_10.sce new file mode 100755 index 000000000..a1eae7656 --- /dev/null +++ b/1529/CH2/EX2.10/2_10.sce @@ -0,0 +1,6 @@ +//Chapter 2, Problem 10 +clc; +I=4e-3; //current in ampere +R=5e3; //resistance +P=I^2*R; //calculating power +printf("Power = %f W",P); diff --git a/1529/CH2/EX2.11/2_11.sce b/1529/CH2/EX2.11/2_11.sce new file mode 100755 index 000000000..ad3295782 --- /dev/null +++ b/1529/CH2/EX2.11/2_11.sce @@ -0,0 +1,8 @@ +//Chapter 2, Problem 11 +clc; +V=240; //voltage +R=30; //resistance +I=V/R; //calculating current using Ohms law +P=I*V; //calculating power +printf("Current = %d A\n\n\n",I); +printf("Power = %f kW",P/1000); diff --git a/1529/CH2/EX2.12/2_12.sce b/1529/CH2/EX2.12/2_12.sce new file mode 100755 index 000000000..408ba1081 --- /dev/null +++ b/1529/CH2/EX2.12/2_12.sce @@ -0,0 +1,8 @@ +//Chapter 2, Problem 12 +clc; +I=5; //Current in ampere +R=100; //Resistance in ohms +V=I*R; //Calculating voltage using Ohms law +P=V*I; //Calculating power in watt +printf("Potential difference across winding = %d V\n\n\n",V); +printf("Power dissipated by coil = %d W",P); diff --git a/1529/CH2/EX2.13/2_13.sce b/1529/CH2/EX2.13/2_13.sce new file mode 100755 index 000000000..5e1839376 --- /dev/null +++ b/1529/CH2/EX2.13/2_13.sce @@ -0,0 +1,7 @@ +//Chapter 2, Problem 13 +clc; +V=240; //voltage +R=960; //resistance +I=V/R; //calculating current using Ohms law +P=V*I; //calculating power +printf("Power rating P = %d W",P); diff --git a/1529/CH2/EX2.14/2_14.sce b/1529/CH2/EX2.14/2_14.sce new file mode 100755 index 000000000..7fd0e066a --- /dev/null +++ b/1529/CH2/EX2.14/2_14.sce @@ -0,0 +1,11 @@ +//Chapter 2, Problem 14 +clc; +V=12; //voltage +R=40; //resistance +t=2*60; //time period +I=V/R; //calculating current using Ohms law +P=V*I; //calculating power +E=P*t; //calculating energy +printf("Current flowing in load = %f A\n\n\n",I); +printf("Power consumed = %f W\n\n\n",P); +printf("Energy dissipated = %f J",E); diff --git a/1529/CH2/EX2.15/2_15.sce b/1529/CH2/EX2.15/2_15.sce new file mode 100755 index 000000000..176895b36 --- /dev/null +++ b/1529/CH2/EX2.15/2_15.sce @@ -0,0 +1,7 @@ +//Chapter 2, Problem 15 +clc; +V=15; //e.m.f +I=2; //current +t=6*60; //time period +E=V*t*I; //calculating energy +printf("Energy = %f kJ",E/1000); diff --git a/1529/CH2/EX2.16/2_16.sce b/1529/CH2/EX2.16/2_16.sce new file mode 100755 index 000000000..afb58c98f --- /dev/null +++ b/1529/CH2/EX2.16/2_16.sce @@ -0,0 +1,9 @@ +//Chapter 2, Problem 16 +clc; +V=240; //supply voltage +I=13; //current +t=30; //time in hours +P=V*I; //power +E=P*t; //energy +printf("Energy used per week = %.1f kWh\n\n",E/1000); +printf("hence weekly cost of electricity = %.2f £ euro",(E*12.5/1000)/100); diff --git a/1529/CH2/EX2.18/2_18.sce b/1529/CH2/EX2.18/2_18.sce new file mode 100755 index 000000000..b6b8a2561 --- /dev/null +++ b/1529/CH2/EX2.18/2_18.sce @@ -0,0 +1,14 @@ +//Chapter 2, Problem 18 +clc; +I=10; //Curent in ampere +R=20; //Resistance in ohm +T=6; //Time in hours +unit=13; //Unit of cost of electricity +P=I^2*R; //Calculating power dissipated by electric fire +E=P*T; //Calculating Energy used +cost=E*unit; //Calculating cost of energy +cost=cost/100000; + +printf("Power dissipated by element = %f kW\n\n\n",P/1000); +printf("Energy used in 6 hours = %f kWh\n\n\n",E/1000); +printf("Cost of energy = £ %fp",cost); diff --git a/1529/CH2/EX2.19/2_19.sce b/1529/CH2/EX2.19/2_19.sce new file mode 100755 index 000000000..50c5bbb85 --- /dev/null +++ b/1529/CH2/EX2.19/2_19.sce @@ -0,0 +1,18 @@ +//Chapter 2, Problem 19 +clc; +P1=3000; //power in watts +P2=150; //power in watts +t1=20; //time in hours +t2=30; //time in hours +n1=2; //no of fires +n2=6; //no of light +m=14; //cost per unit +E1=P1*t1; +w1=n1*E1; +E2=P2*t2; +w2=n2*E2; +T=w1+w2; +c=m*(T/1000); +printf("\nIf the cost of electricity is 14 p per unit\n") +printf("\n the weekly cost of electricity to the business = %f p",c); +printf("\n\t\t\t\t\t\t= %.2f euro",c/100); diff --git a/1529/CH2/EX2.2/2_02.sce b/1529/CH2/EX2.2/2_02.sce new file mode 100755 index 000000000..fa67fba88 --- /dev/null +++ b/1529/CH2/EX2.2/2_02.sce @@ -0,0 +1,6 @@ +//Chapter 2, Problem 2 +clc; +I=10; //Current flows +T=4*60; //Time converted in seconds +Q=I*T; //Calculating charge +printf("Electricity transfered = %f C",Q); //Displaying the result in coulombs diff --git a/1529/CH2/EX2.20/2_20.sce b/1529/CH2/EX2.20/2_20.sce new file mode 100755 index 000000000..b2d6addcd --- /dev/null +++ b/1529/CH2/EX2.20/2_20.sce @@ -0,0 +1,13 @@ +//Chapter 2, Problem 20, +clc; +V=240; //Supply voltage +P1=1000; //Power rating of Electric toaster +P2=3000; //Power rating of Electric fire +//Calculating fuse current for electric toaster +I1=P1/V; +//Calculating fuse current for electric fire +I2=P2/V; +I1=I1+1; +I2=I2+1; +printf("(i) Current in fuse for Electric toaster = %d A\n\n\n",I1); +printf("(ii) Current in fuse for Electric fire = %d A\n\n\n",I2); diff --git a/1529/CH2/EX2.3/2_03.sce b/1529/CH2/EX2.3/2_03.sce new file mode 100755 index 000000000..969a3c513 --- /dev/null +++ b/1529/CH2/EX2.3/2_03.sce @@ -0,0 +1,6 @@ +//Chapter 2, Problem 3 +clc; +V=20; //Potential difference +I=0.8; //Current in ampere +R=V/I; //Calculating resistance using Ohm's law +printf("Resistance = %d ohms",R); diff --git a/1529/CH2/EX2.4/2_04.sce b/1529/CH2/EX2.4/2_04.sce new file mode 100755 index 000000000..720e4e9fd --- /dev/null +++ b/1529/CH2/EX2.4/2_04.sce @@ -0,0 +1,6 @@ +//Chapter 2, Problem 4 +clc; +R=2*10^3; //Resistance in ohms +I=10*10^-3; //Current in ampere +V=R*I; //Calculating voltage +printf("Potential difference = %d V",V); diff --git a/1529/CH2/EX2.5/2_05.sce b/1529/CH2/EX2.5/2_05.sce new file mode 100755 index 000000000..05b97e545 --- /dev/null +++ b/1529/CH2/EX2.5/2_05.sce @@ -0,0 +1,6 @@ +//Chapter 2, Problem 5 +clc; +V=12; //voltage +I=50*10^-3; //current +R=V/I; //calculating resistance using Ohms law +printf("Resistance of coil = %d ohms",R); diff --git a/1529/CH2/EX2.6/2_06.sce b/1529/CH2/EX2.6/2_06.sce new file mode 100755 index 000000000..f54bd79a7 --- /dev/null +++ b/1529/CH2/EX2.6/2_06.sce @@ -0,0 +1,9 @@ +//Chapter 2, Problem 6 +clc; +V1=100; //Battery voltage +I1=5*10^-3; //Current of 5mA; +V2=25; //Voltage is now reduced to 25V +R=V1/I1; //Calculating resistance due to V1 using Ohms law +I2=V2/R; //Calculating current due to V2 using Ohms law +printf("Resistance of resistor = %d k.ohms\n\n\n",R/1000); +printf("Current when voltage is reduced to 25V = %f mA",I2*1000); diff --git a/1529/CH2/EX2.7/2_07.sce b/1529/CH2/EX2.7/2_07.sce new file mode 100755 index 000000000..271db0ceb --- /dev/null +++ b/1529/CH2/EX2.7/2_07.sce @@ -0,0 +1,9 @@ +//Chapter 2, Problem 7 +clc; +V=120; //Supply voltage +I1=50*10^-3; //Current of 50mA +I2=200*10^-6; //Current of 200uA +R1=V/I1; //Calculating resistance due to I1 using Ohms law +R2=V/I2; //Calculating resistance due to I1 using Ohms law +printf("Resistance of coil draws 50mA current = %f ohms\n\n\n",R1); +printf("Resistance of coil draws 100uA current = %f ohms\n\n\n",R2); diff --git a/1529/CH2/EX2.8/2_08.sce b/1529/CH2/EX2.8/2_08.sce new file mode 100755 index 000000000..ae5289479 --- /dev/null +++ b/1529/CH2/EX2.8/2_08.sce @@ -0,0 +1,10 @@ +//Chapter 2, Problem 8, Figure 2.8 +clc; +V1=20; //Voltage of resistor A +I1=20*10^-3; //Current of resistor A +V2=16; //Voltage of resistor B +I2=5*10^-3; //Current of resistor B +R1=V1/I1; //Calculating resistance of resistor A using Ohms law +R2=V2/I2; //Calculating resistance of resistor B using Ohms law +printf("Resistance of resistor A = %d k.ohms\n\n\n",R1/1000); +printf("Resistance of resistor B = %f k.ohms\n\n\n",R2/1000); diff --git a/1529/CH2/EX2.9/2_09.sce b/1529/CH2/EX2.9/2_09.sce new file mode 100755 index 000000000..b83b012c8 --- /dev/null +++ b/1529/CH2/EX2.9/2_09.sce @@ -0,0 +1,8 @@ +//Chapter 2, Problem 9 +clc; +P=100; //power in watt +V=250; //voltage +I=P/V; //calculating current +R=V/I; //calculating resistance using Ohms law +printf("(a) Current = %f A\n\n\n",I); +printf("(b) Resistance = %d ohms",R); -- cgit