diff options
117 files changed, 7509 insertions, 0 deletions
diff --git a/Basic_Electronics_Electronics_Engineering_by_J_B_Gupta/README.txt b/Basic_Electronics_Electronics_Engineering_by_J_B_Gupta/README.txt index 9d9658c1..9d9658c1 100644..100755 --- a/Basic_Electronics_Electronics_Engineering_by_J_B_Gupta/README.txt +++ b/Basic_Electronics_Electronics_Engineering_by_J_B_Gupta/README.txt diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter10_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter10_1.ipynb index 50dcaed0..50dcaed0 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter10_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter10_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter11_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter11_1.ipynb index 397d0367..397d0367 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter11_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter11_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter12_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter12_1.ipynb index c965c427..c965c427 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter12_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter12_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter13_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter13_1.ipynb index 35729415..35729415 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter13_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter13_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter14_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter14_1.ipynb index 897627d8..897627d8 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter14_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter14_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter15_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter15_1.ipynb index cdc0af66..cdc0af66 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter15_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter15_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter16_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter16_1.ipynb index 572bf36e..572bf36e 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter16_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter16_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter2_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter2_1.ipynb index c46040cd..c46040cd 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter2_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter2_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter3_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter3_1.ipynb index d82be350..d82be350 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter3_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter3_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter4_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter4_1.ipynb index 2847c250..2847c250 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter4_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter4_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter5_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter5_1.ipynb index 535073ef..535073ef 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter5_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter5_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter6_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter6_1.ipynb index 72f6d5c3..72f6d5c3 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter6_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter6_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter7_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter7_1.ipynb index 5f7a2321..5f7a2321 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter7_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter7_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter8_1.ipynb b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter8_1.ipynb index 2f0e3fa2..2f0e3fa2 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter8_1.ipynb +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/Chapter8_1.ipynb diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2correlationCoeff_1.png b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2correlationCoeff_1.png Binary files differindex 77e53b40..77e53b40 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2correlationCoeff_1.png +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2correlationCoeff_1.png diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2expansionofSignal_1.png b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2expansionofSignal_1.png Binary files differindex 4d19c746..4d19c746 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2expansionofSignal_1.png +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2expansionofSignal_1.png diff --git a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2timeInvertedsignal_1.png b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2timeInvertedsignal_1.png Binary files differindex 111501c3..111501c3 100644..100755 --- a/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2timeInvertedsignal_1.png +++ b/Modern_Digital_And_Analog_Communication_System_by_B._P._Lathi/screenshots/2timeInvertedsignal_1.png diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter10_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter10_1.ipynb index 0eb7d255..0eb7d255 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter10_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter10_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter11_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter11_1.ipynb index b8b0be75..b8b0be75 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter11_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter11_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter15_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter15_1.ipynb index d45717f4..d45717f4 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter15_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter15_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter1_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter1_1.ipynb index d317e792..d317e792 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter1_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter1_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter2_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter2_1.ipynb index 8d9af0c5..8d9af0c5 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter2_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter2_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter3_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter3_1.ipynb index 49782c9f..49782c9f 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter3_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter3_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter5_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter5_1.ipynb index e234ad9f..e234ad9f 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter5_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter5_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter6_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter6_1.ipynb index c82ada44..c82ada44 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter6_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter6_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter7_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter7_1.ipynb index ee96e59f..ee96e59f 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter7_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter7_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter8_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter8_1.ipynb index 3631a473..3631a473 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter8_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter8_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter9_1.ipynb b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter9_1.ipynb index 2d2304df..2d2304df 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter9_1.ipynb +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/Chapter9_1.ipynb diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/ctftch1.png b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/ctftch1.png Binary files differindex 7c959f08..7c959f08 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/ctftch1.png +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/ctftch1.png diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/fourierTransch1.png b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/fourierTransch1.png Binary files differindex c0033679..c0033679 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/fourierTransch1.png +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/fourierTransch1.png diff --git a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/modulatedWaveChap3_1.png b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/modulatedWaveChap3_1.png Binary files differindex 3b34f439..3b34f439 100644..100755 --- a/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/modulatedWaveChap3_1.png +++ b/Principle_of_Communication_Engineering_by_A._Singh_and_A._K._Chhabra/screenshots/modulatedWaveChap3_1.png diff --git a/Principles_of_Electronics_____by_V.K._Mehta_and_Rohit_Mehta/README.txt b/Principles_of_Electronics_____by_V.K._Mehta_and_Rohit_Mehta/README.txt index 5b63e503..5b63e503 100644..100755 --- a/Principles_of_Electronics_____by_V.K._Mehta_and_Rohit_Mehta/README.txt +++ b/Principles_of_Electronics_____by_V.K._Mehta_and_Rohit_Mehta/README.txt diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter10_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter10_1.ipynb index a26284d9..a26284d9 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter10_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter10_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter11_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter11_1.ipynb index 2cd846f8..2cd846f8 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter11_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter11_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter12_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter12_1.ipynb index 2c961102..2c961102 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter12_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter12_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter1_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter1_1.ipynb index d6e53c88..d6e53c88 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter1_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter1_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter2_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter2_1.ipynb index 63a5a06a..63a5a06a 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter2_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter2_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter3_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter3_1.ipynb index a0fd4aba..a0fd4aba 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter3_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter3_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter4_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter4_1.ipynb index cf309081..cf309081 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter4_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter4_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter5_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter5_1.ipynb index c69c6d26..c69c6d26 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter5_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter5_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter6_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter6_1.ipynb index d8624900..d8624900 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter6_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter6_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter7_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter7_1.ipynb index 242910a9..242910a9 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter7_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter7_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter8_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter8_1.ipynb index 8f45a209..8f45a209 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter8_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter8_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter9_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter9_1.ipynb index 6dec3b62..6dec3b62 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter9_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/Chapter9_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/chapter13_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/chapter13_1.ipynb index c0e79f73..c0e79f73 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/chapter13_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/chapter13_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/chapter14_1.ipynb b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/chapter14_1.ipynb index ead244bb..ead244bb 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/chapter14_1.ipynb +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/chapter14_1.ipynb diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter10.png b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter10.png Binary files differindex 3da40d4f..3da40d4f 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter10.png +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter10.png diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter1_1.png b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter1_1.png Binary files differindex 3b8779fb..3b8779fb 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter1_1.png +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter1_1.png diff --git a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter5.png b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter5.png Binary files differindex 6a230a12..6a230a12 100644..100755 --- a/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter5.png +++ b/Solid_State_Electronic_Devices_by_D.K_Bhattacharya_,_Rajnish_Sharma/screenshots/Chapter5.png diff --git a/Solutions_to_Problems_in_Applied_Mechanics_by_A._N._Gobby/README.txt b/Solutions_to_Problems_in_Applied_Mechanics_by_A._N._Gobby/README.txt index eaa6294a..eaa6294a 100644..100755 --- a/Solutions_to_Problems_in_Applied_Mechanics_by_A._N._Gobby/README.txt +++ b/Solutions_to_Problems_in_Applied_Mechanics_by_A._N._Gobby/README.txt diff --git a/Theory_of_Alternating_Current_Machinery_by_A._S._Langsdorf/README.txt b/Theory_of_Alternating_Current_Machinery_by_A._S._Langsdorf/README.txt index b2e44e78..b2e44e78 100644..100755 --- a/Theory_of_Alternating_Current_Machinery_by_A._S._Langsdorf/README.txt +++ b/Theory_of_Alternating_Current_Machinery_by_A._S._Langsdorf/README.txt diff --git a/Thermodynamics_by_Gaggioli_and_Obert/Ch18.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/Ch18.ipynb index ef61bd07..ef61bd07 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/Ch18.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/Ch18.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/Ch8.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/Ch8.ipynb index 2e3ca609..2e3ca609 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/Ch8.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/Ch8.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch1.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch1.ipynb index 56ea81cb..56ea81cb 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch1.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch1.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch10.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch10.ipynb index 4ac6845c..4ac6845c 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch10.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch10.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch11.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch11.ipynb index 001bcdc2..001bcdc2 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch11.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch11.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch12.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch12.ipynb index c7c68649..c7c68649 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch12.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch12.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch13.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch13.ipynb index efe4a78b..efe4a78b 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch13.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch13.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch14.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch14.ipynb index 51e36300..51e36300 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch14.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch14.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch15.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch15.ipynb index 0309850b..0309850b 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch15.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch15.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch16.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch16.ipynb index 5fcd8569..5fcd8569 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch16.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch16.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch17.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch17.ipynb index 9b54ad03..9b54ad03 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch17.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch17.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch2.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch2.ipynb index 30c440b6..30c440b6 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch2.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch2.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch3.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch3.ipynb index 9ac141c2..9ac141c2 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch3.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch3.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch5.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch5.ipynb index 576e9b60..576e9b60 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch5.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch5.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch7.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch7.ipynb index 54e86231..54e86231 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch7.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch7.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/ch9.ipynb b/Thermodynamics_by_Gaggioli_and_Obert/ch9.ipynb index 6a516fc0..6a516fc0 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/ch9.ipynb +++ b/Thermodynamics_by_Gaggioli_and_Obert/ch9.ipynb diff --git a/Thermodynamics_by_Gaggioli_and_Obert/screenshots/changeInMoisture14.png b/Thermodynamics_by_Gaggioli_and_Obert/screenshots/changeInMoisture14.png Binary files differindex bc4da4d9..bc4da4d9 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/screenshots/changeInMoisture14.png +++ b/Thermodynamics_by_Gaggioli_and_Obert/screenshots/changeInMoisture14.png diff --git a/Thermodynamics_by_Gaggioli_and_Obert/screenshots/degreeOfSaturation14.png b/Thermodynamics_by_Gaggioli_and_Obert/screenshots/degreeOfSaturation14.png Binary files differindex 7bb12dd0..7bb12dd0 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/screenshots/degreeOfSaturation14.png +++ b/Thermodynamics_by_Gaggioli_and_Obert/screenshots/degreeOfSaturation14.png diff --git a/Thermodynamics_by_Gaggioli_and_Obert/screenshots/humidityratio14.png b/Thermodynamics_by_Gaggioli_and_Obert/screenshots/humidityratio14.png Binary files differindex cb399933..cb399933 100644..100755 --- a/Thermodynamics_by_Gaggioli_and_Obert/screenshots/humidityratio14.png +++ b/Thermodynamics_by_Gaggioli_and_Obert/screenshots/humidityratio14.png diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter1.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter1.ipynb new file mode 100644 index 00000000..5f994464 --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter1.ipynb @@ -0,0 +1,244 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Atomic Spectra" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 42" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength separation is 0.168 angstrom\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "B=1; #flux density(Wb/m**2)\n", + "lamda=6000*10**-10; #wavelength(m)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "d_lamda=B*e*(lamda**2)/(4*math.pi*m0*c); #wavelength separation(m)\n", + "d_lamda=d_lamda*10**10; #wavelength separation(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength separation is\",round(d_lamda,3),\"angstrom\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example number 2, Page number 42" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic field is 5.89 *10**-2 tesla\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant\n", + "delta_v=8.3*10**8; #frequency separation(Hz)\n", + "mewB=9.3*10**-24; #magnetic moment\n", + "\n", + "#Calculations\n", + "B=h*delta_v/mewB; #magnetic field(tesla)\n", + "\n", + "#Result\n", + "print \"magnetic field is\",round(B*10**2,2),\"*10**-2 tesla\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 42" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of charge to mass of electron is 1.753 *10**11 coulomb/kg\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "dv=120*10**6; #frequency(Hz)\n", + "B=8.6*10**-3; #flux density(T)\n", + "\n", + "#Calculations\n", + "r=4*math.pi*dv/B; #ratio of charge to mass of electron(coulomb/kg)\n", + "\n", + "#Result\n", + "print \"ratio of charge to mass of electron is\",round(r/10**11,3),\"*10**11 coulomb/kg\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 42" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the three wavelengths are 4226.4 angstrom 4226.73 angstrom 4227.06 angstrom\n", + "answers for wavelengths given in the book are wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "B=4; #flux density(Wb/m**2)\n", + "lamda=4226.73*10**-10; #wavelength(m)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "d_lamda=B*e*(lamda**2)/(4*math.pi*m0*c); #wavelength separation(m)\n", + "d_lamda=round(d_lamda*10**10,2); #wavelength separation(angstrom)\n", + "l1=(lamda*10**10)-d_lamda;\n", + "l2=lamda*10**10;\n", + "l3=(lamda*10**10)+d_lamda; #three wavelengths\n", + "\n", + "#Result\n", + "print \"the three wavelengths are\",l1,\"angstrom\",l2,\"angstrom\",l3,\"angstrom\"\n", + "print \"answers for wavelengths given in the book are wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 43" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of charge to mass of electron is 1.75 *10**11 C/kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "dlamda=0.0116*10**-9; #frequency(m)\n", + "B=1; #flux density(T)\n", + "lamda=500*10**-9; #wavelength(m)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "r=4*math.pi*c*dlamda/(B*lamda**2); #ratio of charge to mass of electron(coulomb/kg)\n", + "\n", + "#Result\n", + "print \"ratio of charge to mass of electron is\",round(r/10**11,2),\"*10**11 C/kg\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter10.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter10.ipynb new file mode 100644 index 00000000..c43b7f8c --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter10.ipynb @@ -0,0 +1,196 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 10: Nuclear Detectors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 284" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average current is 1.33 *10**-10 amp\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=500; #counting rate(counts/min)\n", + "n=10**8; #number of electrons per discharge\n", + "e=1.6*10**-19; #charge(coul)\n", + "\n", + "#Calculations\n", + "tn=n*c*e; #total number of electrons collected(coul/min)\n", + "q=tn/60; #average current(amp)\n", + "\n", + "#Result\n", + "print \"average current is\",round(q*10**10,2),\"*10**-10 amp\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 284" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "counting rate per min is 500\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "q=1.333*10**-18; #current(amp)\n", + "e=1.6*10**-19; #charge(coul)\n", + "\n", + "#Calculations\n", + "n=q*60/e; #counting rate per min\n", + "\n", + "#Result\n", + "print \"counting rate per min is\",int(round(n))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 284" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum permissible voltage fluctuations is 3.3 volt\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "cr=3; #change in count rate(%)\n", + "cv=100; #change in working volt(V)\n", + "crl=0.1; #count rate limit(%)\n", + "\n", + "#Calculations\n", + "V=crl*cv/cr; #maximum permissible voltage fluctuations(volt)\n", + "\n", + "#Result\n", + "print \"maximum permissible voltage fluctuations is\",round(V,1),\"volt\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 285" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radial field at the centre is 9.45 *10**3 V/m\n", + "answer for radial field given in the book is wrong\n", + "counter will last for 3.7 years\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "V=1000; #voltage(V)\n", + "r=0.02; #radius(m)\n", + "b=2*10**-2; \n", + "a=10**-4; \n", + "lt=10**9; #life time(counts)\n", + "x=2.7*10**8; \n", + "\n", + "#Calculations\n", + "Emax=V/(r*(2.3*math.log10(b/a))); #radial field at the centre(V/m)\n", + "N=lt/x; #counter will last for(years)\n", + "\n", + "#Result\n", + "print \"radial field at the centre is\",round(Emax/10**3,2),\"*10**3 V/m\"\n", + "print \"answer for radial field given in the book is wrong\"\n", + "print \"counter will last for\",round(N,1),\"years\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter11.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter11.ipynb new file mode 100644 index 00000000..3df2a802 --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter11.ipynb @@ -0,0 +1,370 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 11: Crystal Structure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 299" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 4 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=4; #number of molecules per unit cell\n", + "M=60.2; #molecular weight\n", + "N=6.02*10**26; #avagadro number(kg mol-1)\n", + "rho=6250; #density(kg/m**3)\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",int(a*10**10),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 299" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 2.867 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=2; #number of molecules per unit cell\n", + "M=55.8; #molecular weight\n", + "N=6.02*10**26; #avagadro number(kg mol-1)\n", + "rho=7870; #density(kg/m**3)\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",round(a*10**10,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 299" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between two nearest copper atoms is 2.55 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=4; #number of molecules per unit cell\n", + "M=63.5; #molecular weight\n", + "N=6.02*10**23; #avagadro number(kg mol-1)\n", + "rho=8.96; #density(gm/cm**3)\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(m)\n", + "d=a/math.sqrt(2); #distance between two nearest copper atoms(cm)\n", + "\n", + "#Result\n", + "print \"distance between two nearest copper atoms is\",round(d*10**8,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 303" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices of plane are ( 3 2 1 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a=1/2;\n", + "b=1/3;\n", + "c=1/6; #intercepts along the three axes\n", + "\n", + "#Calculations\n", + "def lcm(x, y):\n", + " if x > y:\n", + " greater = x\n", + " else:\n", + " greater = y\n", + " while(True):\n", + " if((greater % x == 0) and (greater % y == 0)):\n", + " lcm = greater\n", + " break\n", + " greater += 1\n", + " \n", + " return lcm\n", + "\n", + "z=lcm(1/a,1/b);\n", + "lcm=lcm(z,1/c);\n", + "h=a*lcm;\n", + "k=b*lcm;\n", + "l=c*lcm; #miller indices of plane\n", + "\n", + "#Result\n", + "print \"miller indices of plane are (\",int(h),int(k),int(l),\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 303" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices of plane are ( 3 4 0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a=1/4;\n", + "b=1/3;\n", + "x=float(\"inf\");\n", + "c=1/x; #intercepts along the three axes\n", + "\n", + "#Calculations\n", + "def lcm(x, y):\n", + " if x > y:\n", + " greater = x\n", + " else:\n", + " greater = y\n", + " while(True):\n", + " if((greater % x == 0) and (greater % y == 0)):\n", + " lcm = greater\n", + " break\n", + " greater += 1\n", + " \n", + " return lcm\n", + "\n", + "lcm=lcm(1/a,1/b);\n", + "h=a*lcm;\n", + "k=b*lcm;\n", + "l=c*lcm; #miller indices of plane\n", + "\n", + "#Result\n", + "print \"miller indices of plane are (\",int(h),int(k),int(l),\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 303" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices of plane are ( 6 -2 3 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a=1/1;\n", + "b=-1/3;\n", + "c=1/2; #intercepts along the three axes\n", + "\n", + "#Calculations\n", + "def lcm(x, y):\n", + " if x > y:\n", + " greater = x\n", + " else:\n", + " greater = y\n", + " while(True):\n", + " if((greater % x == 0) and (greater % y == 0)):\n", + " lcm = greater\n", + " break\n", + " greater += 1\n", + " \n", + " return lcm\n", + "\n", + "z=lcm(1/a,1/b);\n", + "lcm=lcm(z,1/c);\n", + "h=a*lcm;\n", + "k=b*lcm;\n", + "l=c*lcm; #miller indices of plane\n", + "\n", + "#Result\n", + "print \"miller indices of plane are (\",int(h),int(k),int(l),\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 304" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intercept on y-axis is 1.2 angstrom\n", + "intercept on z-axis is 4.0 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "p1=1.2; #x-primitive(angstrom)\n", + "p2=1.8; #y-primitive(angstrom)\n", + "p3=2.0; #z-primitive(angstrom)\n", + "x=2; #x-intercept\n", + "y=3; #y-intercept\n", + "z=1; #z-intercept\n", + "h=1.2; #intercept on x-axis(angstrom)\n", + "\n", + "#Calculations\n", + "h1=p1/x; \n", + "k1=p2/y;\n", + "l1=p3/z;\n", + "k=h*k1/h1; #intercept on y-axis(angstrom)\n", + "l=h*p3/h1; #intercept on z-axis(angstrom)\n", + "\n", + "#Result\n", + "print \"intercept on y-axis is\",k,\"angstrom\"\n", + "print \"intercept on z-axis is\",l,\"angstrom\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter12.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter12.ipynb new file mode 100644 index 00000000..49af2dee --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter12.ipynb @@ -0,0 +1,683 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 12: X-ray Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of X-rays is 0.97938 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=1; #order\n", + "d=2.82*10**-10; #spacing(m)\n", + "theta=10*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "lamda=2*d*math.sin(theta)/n; #wavelength of X-rays(m)\n", + "\n", + "#Result\n", + "print \"wavelength of X-rays is\",round(lamda*10**10,5),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of X-rays is 1.262 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=1; #order\n", + "d=3.035*10**-10; #spacing(m)\n", + "theta=12*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "lamda=2*d*math.sin(theta)/n; #wavelength of X-rays(m)\n", + "\n", + "#Result\n", + "print \"wavelength of X-rays is\",round(lamda*10**10,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 323" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "their wavelengths are 1.464 angstrom and 1.6525 angstrom\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=1; #order\n", + "d=2.81; #spacing(angstrom)\n", + "theta1=15.1*math.pi/180; #angle of diffraction(radian)\n", + "theta2=17.1*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "lamda1=2*d*math.sin(theta1)/n; #wavelength(angstrom)\n", + "lamda2=2*d*math.sin(theta2)/n; #wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"their wavelengths are\",round(lamda1,3),\"angstrom and\",round(lamda2,4),\"angstrom\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing is 4.035 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=1; #order\n", + "lamda=1.54; #wavelength of X-rays(angstrom)\n", + "theta=11*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "d=lamda/(2*math.sin(theta)); #spacing(angstrom)\n", + "\n", + "#Result\n", + "print \"spacing is\",round(d,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of line A is 1.593 angstrom\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=1; #order\n", + "n2=3; #order\n", + "theta1=30*math.pi/180; #angle of diffraction(radian)\n", + "theta2=60*math.pi/180; #angle of diffraction(radian)\n", + "lamdaB=0.92; #wavelength(angstrom)\n", + "\n", + "#Calculations\n", + "lamdaA=n2*lamdaB*math.sin(theta1)/math.sin(theta2); #wavelength of line A(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength of line A is\",round(lamdaA,3),\"angstrom\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 324" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of electrons is 0.7406 *10**-10 m\n", + "velocity of electrons is 9.793 *10**6 m/sec\n", + "answers given in the book are wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=1; #order\n", + "d=0.4086*10**-10; #spacing(m)\n", + "theta=65*math.pi/180; #angle of diffraction(radian)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "lamda=2*d*math.sin(theta)/n; #wavelength of electrons(m)\n", + "v=h/(m*lamda); #velocity of electrons(m/sec)\n", + "\n", + "#Result\n", + "print \"wavelength of electrons is\",round(lamda*10**10,4),\"*10**-10 m\"\n", + "print \"velocity of electrons is\",round(v/10**6,3),\"*10**6 m/sec\"\n", + "print \"answers given in the book are wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 325" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "longest wavelength is 5.64 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=1; #order\n", + "d=2.82*10**-10; #spacing(m)\n", + "sintheta=1; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "lamdamax=2*d*sintheta/n; #longest wavelength(m)\n", + "\n", + "#Result\n", + "print \"longest wavelength is\",lamdamax*10**10,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 325" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing order is 26.599 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=1; #order\n", + "n2=3; #order\n", + "lamda=0.842*10**-10; #wavelength(m)\n", + "theta1=(8+(35/60))*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "theta3=math.asin(n2*math.sin(theta1)); #glancing order(radian)\n", + "\n", + "#Result\n", + "print \"glancing order is\",round(theta3*180/math.pi,3),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 325" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing in 1st case is 1.289 angstrom\n", + "spacing in 2nd case is 1.824 angstrom\n", + "spacing in 3rd case is 0.648 angstrom\n", + "answers given in the book are wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=1; #order\n", + "lamda=0.58; #wavelength of X-rays(angstrom)\n", + "theta1=6.45*math.pi/180; #angle of diffraction(radian)\n", + "theta2=9.15*math.pi/180; #angle of diffraction(radian)\n", + "theta1=13*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "d1=lamda/(2*math.sin(theta1)); #spacing in 1st case(angstrom)\n", + "d2=lamda/(2*math.sin(theta2)); #spacing in 2nd case(angstrom)\n", + "d3=lamda/(2*math.sin(theta3)); #spacing in 3rd case(angstrom)\n", + "\n", + "#Result\"\n", + "print \"spacing in 1st case is\",round(d1,3),\"angstrom\"\n", + "print \"spacing in 2nd case is\",round(d2,3),\"angstrom\"\n", + "print \"spacing in 3rd case is\",round(d3,3),\"angstrom\"\n", + "print \"answers given in the book are wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 326" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "seperation of adjacent atoms is 2.823 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "M=58.5; #molecular weight(kg/k-mole)\n", + "N=6.02*10**26; #avagadro number(mol/k-mole)\n", + "rho=2.16*10**3; #density(kg/m**3)\n", + "\n", + "#Calculations\n", + "d=(M/(2*N*rho))**(1/3); #seperation of adjacent atoms(m)\n", + "\n", + "#Result\n", + "print \"seperation of adjacent atoms is\",round(d*10**10,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice spacing is 2.7882 angstrom\n", + "avagadro number is 6.234 *10**26 mol/k-mole\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "M=58.454; #molecular weight(kg/k-mole)\n", + "n=1; #order\n", + "rho=2163; #density(kg/m**3)\n", + "lamda=1.3922*10**-10; #wavelength(m)\n", + "theta=(14+(27/60)+(26/3600))*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "d=n*lamda/(2*math.sin(theta)); #lattice spacing(m)\n", + "N=M/(2*rho*d**3); #avagadro number(mol/k-mole)\n", + "\n", + "#Result\n", + "print \"lattice spacing is\",round(d*10**10,4),\"angstrom\"\n", + "print \"avagadro number is\",round(N/10**26,3),\"*10**26 mol/k-mole\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12, Page number 327" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "orders of reflection is 1 : 2 : 3\n", + "spacing at first order is 2.8187 *10**-10 m\n", + "spacing at second order is 2.7805 *10**10 m\n", + "spacing at third order is 2.8143 *10**-10 m\n", + "mean value of crystal lattice spacing is 2.804 *10**-10 m\n", + "answers given in the book vary due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "lamda=0.586*10**-10; #wavelength(m)\n", + "theta1=(5+(58/60))*math.pi/180; #angle of diffraction(radian)\n", + "theta2=(12+(10/60))*math.pi/180; #angle of diffraction(radian)\n", + "theta3=(18+(12/60))*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "a=int(10*math.sin(theta1)); \n", + "b=int(10*math.sin(theta2)); \n", + "c=int(10*math.sin(theta3)); \n", + "d1=a*lamda/(2*math.sin(theta1)); #spacing at first order(m)\n", + "d2=b*lamda/(2*math.sin(theta2)); #spacing at second order(m)\n", + "d3=c*lamda/(2*math.sin(theta3)); #spacing at third order(m)\n", + "d=(d1+d2+d3)/3; #mean value of crystal lattice spacing(m)\n", + "\n", + "#Result\n", + "print \"orders of reflection is\",a,\":\",b,\":\",c\n", + "print \"spacing at first order is\",round(d1*10**10,4),\"*10**-10 m\"\n", + "print \"spacing at second order is\",round(d2*10**10,4),\"*10**10 m\"\n", + "print \"spacing at third order is\",round(d3*10**10,4),\"*10**-10 m\"\n", + "print \"mean value of crystal lattice spacing is\",round(d*10**10,3),\"*10**-10 m\"\n", + "print \"answers given in the book vary due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 328" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of spacing is 1 : 1 *math.sqrt(2) : 1 *math.sqrt(3)\n", + "the crystal is simple cubic crystal\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "theta1=(5+(23/60))*math.pi/180; #angle of diffraction(radian)\n", + "theta2=(7+(37/60))*math.pi/180; #angle of diffraction(radian)\n", + "theta3=(9+(25/60))*math.pi/180; #angle of diffraction(radian)\n", + "\n", + "#Calculations\n", + "d1=math.sin(theta1); #spacing at first order(m)\n", + "d2=math.sin(theta2); #spacing at second order(m)\n", + "d3=math.sin(theta3); #spacing at third order(m)\n", + "x=d1/d1;\n", + "y=round(d2/(d1*math.sqrt(2)));\n", + "z=round(d3/(math.sqrt(3)*d1));\n", + "\n", + "#Result\n", + "print \"ratio of spacing is\",int(x),\":\",int(y),\"*math.sqrt(2) :\",int(z),\"*math.sqrt(3)\"\n", + "print \"the crystal is simple cubic crystal\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14, Page number 328" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of Kalpha is 0.589 angstrom\n", + "answer given in the book is wrong due to printing mistake\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "M=58.46; #molecular weight(kg/k-mole)\n", + "N=6.02*10**26; #avagadro number(mol/k-mole)\n", + "rho=2170; #density(kg/m**3)\n", + "theta=6*math.pi/180; #angle of diffraction(radian)\n", + "n=1; #order\n", + "\n", + "#Calculations\n", + "d=(M/(2*N*rho))**(1/3); #seperation of adjacent atoms(m)\n", + "lamda=2*d*math.sin(theta)/n; #wavelength of Kalpha(m)\n", + "\n", + "#Result\n", + "print \"wavelength of Kalpha is\",round(lamda*10**10,3),\"angstrom\"\n", + "print \"answer given in the book is wrong due to printing mistake\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15, Page number 329" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing of crystal is 0.38 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "E=344; #energy(V) \n", + "theta=60*math.pi/180; #angle of diffraction(radian)\n", + "n=1; #order\n", + "m=9*10**-31; #mass(kg)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "lamda=h/math.sqrt(2*m*e*E); #wavelength(m)\n", + "d=n*lamda/(2*math.sin(theta)); #spacing of crystal(m)\n", + "\n", + "#Result\n", + "print \"spacing of crystal is\",round(d*10**10,2),\"angstrom\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter14.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter14.ipynb new file mode 100644 index 00000000..aa9c199b --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter14.ipynb @@ -0,0 +1,75 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 14: Bonding In Crystals" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "potential energy per ion pair is -3.981 eV\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge of electron(coulomb)\n", + "r0=2.81*10**-10; #distance between ions(m)\n", + "A=1.748; #constant\n", + "x=9*10**9; #let x=1/(4*math.pi*epsilon0)\n", + "n=9; \n", + "\n", + "#Calculations\n", + "U0=-x*A*e**2*(1-(1/n))/(e*r0); #potential energy per ion pair(eV)\n", + "\n", + "#Result\n", + "print \"potential energy per ion pair is\",round(U0/2,3),\"eV\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter15.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter15.ipynb new file mode 100644 index 00000000..fdc8bb09 --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter15.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 15: Magnetism " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 375" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "susceptibility at 300K is 3.267 *10**-4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "chi1=2.8*10**-4; #susceptibility\n", + "T1=350; #temperature(K)\n", + "T2=300; #temperature(K)\n", + "\n", + "#Calculations\n", + "chi2=chi1*(T1/T2); #susceptibility at 300K\n", + "\n", + "#Result\n", + "print \"susceptibility at 300K is\",round(chi2*10**4,3),\"*10**-4\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter16.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter16.ipynb new file mode 100644 index 00000000..12620572 --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter16.ipynb @@ -0,0 +1,361 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 16: Superconductivity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 384" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical magnetic field is 6.37 *10**4 A/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "HcT=3.3*10**4; #critical magnetic field(A/m)\n", + "T=5; #temperature(K)\n", + "Tc=7.2; #critical temperature(K)\n", + "\n", + "#Calculations\n", + "Hc0=HcT/(1-(T/Tc)**2); #magnetic field(A/m)\n", + "\n", + "#Result\n", + "print \"magnetic field is\",round(Hc0/10**4,2),\"*10**4 A/m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 384" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 7.08 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "HcT=4*10**4; #critical magnetic field(A/m)\n", + "Tc=7.26; #critical temperature(K)\n", + "Hc0=8*10**5; #magnetic field(A/m)\n", + "\n", + "#Calculations\n", + "T=Tc*math.sqrt(1-(HcT/Hc0)); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,2),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 384" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 6.83 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "Hc0=1; #assume\n", + "HcT=0.1*Hc0; #critical magnetic field(A/m)\n", + "Tc=7.2; #critical temperature(K)\n", + "\n", + "#Calculations\n", + "T=Tc*math.sqrt(1-(HcT/Hc0)); #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",round(T,2),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 385" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical magnetic field is 0.0217 tesla\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "Hc0=0.0306; #magnetic field(Tesla)\n", + "T=2; #temperature(K)\n", + "Tc=3.7; #critical temperature(K)\n", + "\n", + "#Calculations\n", + "HcT=Hc0*(1-(T/Tc)**2); #critical magnetic field(tesla)\n", + "\n", + "#Result\n", + "print \"critical magnetic field is\",round(HcT,4),\"tesla\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 385" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature is 8.21 K\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "HcT=1*10**4; #critical magnetic field(A/m)\n", + "T=8; #temperature(K)\n", + "Hc0=2*10**5; #magnetic field(A/m)\n", + "\n", + "#Calculations\n", + "Tc=T/math.sqrt(1-(HcT/Hc0)); #transition temperature(K)\n", + "\n", + "#Result\n", + "print \"transition temperature is\",round(Tc,2),\"K\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 385" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transition temperature is 14.5 K\n", + "critical field at 0K is 20.66 *10**5 A/m\n", + "critical field at 4.2K is 18.9 *10**5 A/m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "Hc1=1.4*10**5; #critical magnetic field(A/m)\n", + "Hc2=4.2*10**5; #critical magnetic field(A/m)\n", + "T1=14; #temperature(K)\n", + "T2=13; #temperature(K)\n", + "T3=4.2; #temperature(K)\n", + "\n", + "#Calculations\n", + "Tc=round(math.sqrt(((Hc1*T2**2)-(Hc2*T1**2))/(Hc1-Hc2)),1); #transition temperature(K)\n", + "H0=Hc1/(1-(T1/Tc)**2); #critical field at 0K(A/m)\n", + "Hc=H0*(1-(T3/Tc)**2); #critical field at 4.2K(A/m)\n", + "\n", + "#Result\n", + "print \"transition temperature is\",Tc,\"K\"\n", + "print \"critical field at 0K is\",round(H0/10**5,2),\"*10**5 A/m\"\n", + "print \"critical field at 4.2K is\",round(Hc/10**5,1),\"*10**5 A/m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 390" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical current is 24.819 amp\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "r=(10**-3)/2; #radius(m)\n", + "Hc=7.9*10**3; #critical field(A/m)\n", + "\n", + "#Calculations\n", + "Ic=2*math.pi*r*Hc; #critical current(amp)\n", + "\n", + "#Result\n", + "print \"critical current is\",round(Ic,3),\"amp\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 390" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "critical magnetic field is 4.276 *10**4 A/m\n", + "critical current is 134.3 amp\n", + "current density is 1.71 *10**8 A/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "Hc0=6.5*10**4; #magnetic field(Tesla)\n", + "T=4.2; #temperature(K)\n", + "Tc=7.18; #critical temperature(K)\n", + "r=(10**-3)/2; #radius(m)\n", + "\n", + "#Calculations\n", + "HcT=Hc0*(1-(T/Tc)**2); #critical magnetic field(tesla)\n", + "Ic=2*math.pi*r*HcT; #critical current(amp)\n", + "A=math.pi*r**2; #area(m**2)\n", + "Jc=Ic/A; #current density(A/m**2)\n", + "\n", + "#Result\n", + "print \"critical magnetic field is\",round(HcT/10**4,3),\"*10**4 A/m\"\n", + "print \"critical current is\",round(Ic,1),\"amp\"\n", + "print \"current density is\",round(Jc/10**8,2),\"*10**8 A/m**2\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter2.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter2.ipynb new file mode 100644 index 00000000..3996a39d --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter2.ipynb @@ -0,0 +1,247 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 2: Molecular Spectroscopy" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 56" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy is 4.75 *10**-4 eV\n", + "angular velocity is 10.21 *10**11 rad/sec\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planck's constant\n", + "I=1.46*10**-46; #moment of inertia(kg-m**2)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "Er=2*(h**2)/(8*math.pi**2*I*e); #energy(eV)\n", + "omega=math.sqrt(2*Er*e/I); #angular velocity(rad/sec)\n", + "\n", + "#Result\n", + "print \"energy is\",round(Er*10**4,2),\"*10**-4 eV\"\n", + "print \"angular velocity is\",round(omega*10**-11,2),\"*10**11 rad/sec\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 62" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of vibration is 2.04 *10**13 Hertz\n", + "spacing between energy levels is 8.44 *10**-2 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planck's constant\n", + "K=187; #force constant(N/m)\n", + "mew=1.14*10**-26; #reduced mass(kg)\n", + "c=6.242*10**18; #conversion factor\n", + "\n", + "#Calculations\n", + "vnew=math.sqrt(K/mew)/(2*math.pi); #frequency of vibration(Hertz)\n", + "delta_E=h*vnew; #spacing between energy levels(J)\n", + "delta_E=delta_E*c; #spacing between energy levels(eV)\n", + "\n", + "#Result\n", + "print \"frequency of vibration is\",round(vnew/10**13,2),\"*10**13 Hertz\"\n", + "print \"spacing between energy levels is\",round(delta_E*10**2,2),\"*10**-2 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 68" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of antistokes line 5401 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "lamda0=5460*10**-8; #wavelength(cm)\n", + "lamdas=5520*10**-8; #wavelength(cm)\n", + "\n", + "#Calculations\n", + "new0=1/lamda0; #frequency(cm-1)\n", + "news=1/lamdas; #frequency(cm-1)\n", + "delta_new=new0-news; #difference in frequency(cm-1)\n", + "new_as=delta_new+new0; #frequency of anti-stokes line(cm-1)\n", + "lamda_as=1*10**8/new_as; #wavelength of antistokes line(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength of antistokes line\",int(lamda_as),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 68" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "raman shift is 459.2 *10**2 m-1\n", + "wavelength of antistokes line 4272.5 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "lamda0=4358*10**-10; #wavelength(m)\n", + "lamda1=4447*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "new0=1/lamda0; #frequency(m-1)\n", + "new1=1/lamda1; #frequency(m-1)\n", + "rs=new0-new1; #raman shift(m-1)\n", + "new_as=new0+rs; #frequency of anti-stokes line(cm-1)\n", + "lamda_as=1*10**10/new_as; #wavelength of antistokes line(angstrom)\n", + "\n", + "#Result\n", + "print \"raman shift is\",round(rs/10**2,1),\"*10**2 m-1\"\n", + "print \"wavelength of antistokes line\",round(lamda_as,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 71" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of wave numbers is 1 : 0.52 : 0.31\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "K1=4141.3; #wave number of HF(cm-1)\n", + "K2=2988.9; #wave number of HCl(cm-1)\n", + "K3=2309.5; #wave number of HI(cm-1)\n", + "c=1; #assume as common factor in ratio\n", + "\n", + "#Calculations\n", + "a=(K2/K1)**2; #ratio of wave numbers of HF and HCl\n", + "b=(K3/K1)**2; #ratio of wave numbers of HF and HI\n", + "\n", + "#Result\n", + "print \"ratio of wave numbers is\",c,\":\",round(a,2),\":\",round(b,2)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter3.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter3.ipynb new file mode 100644 index 00000000..54be57bc --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter3.ipynb @@ -0,0 +1,2194 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3: Photoelectric Effect, Compton Effect and Bohr's Atomic Theory" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of photon in joules is 3.37 *10**-19 J\n", + "energy of photon in eV is 2.1 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda=5893*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "E=h*c/lamda; #energy of photon(J)\n", + "E_eV=E/e; #energy of photon(eV)\n", + "\n", + "#Result\n", + "print \"energy of photon in joules is\",round(E*10**19,2),\"*10**-19 J\"\n", + "print \"energy of photon in eV is\",round(E_eV,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "threshold wavelength is 2566 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "W0=4.84*e; #work function(J)\n", + "h=6.624*10**-34; #planks constant(Js)\n", + "c=3*10**8; #velocity(m/sec)\n", + "\n", + "#Calculations\n", + "lamda0=h*c/W0; #threshold wavelength(m)\n", + "\n", + "#Result\n", + "print \"threshold wavelength is\",int(lamda0*10**10),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 103" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "work function is 3.943 *10**-19 J\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.624*10**-34; #planks constant(Js)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda0=5040*10**-10; #threshold wavelength(m)\n", + "\n", + "#Calculations\n", + "W0=h*c/lamda0; #work function(J)\n", + "\n", + "#Result\n", + "print \"work function is\",round(W0*10**19,3),\"*10**-19 J\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 104" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "planks constant is 6.612 *10**-34 Joule sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda0=5040*10**-10; #threshold wavelength(m)\n", + "W0=2.46*e; #work function(J)\n", + "\n", + "#Calculations\n", + "h=W0*lamda0/c; #planks constant(Js)\n", + "\n", + "#Result\n", + "print \"planks constant is\",round(h*10**34,3),\"*10**-34 Joule sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 104" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of light is 4.144 *10**-7 metre\n", + "answer varies due to rounding of errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "W0=2.2; #work function(eV)\n", + "Kmax=0.8; #work function(eV)\n", + "\n", + "#Calculations\n", + "lamda=h*c/((W0+Kmax)*e); #wavelength of light(metre)\n", + "\n", + "#Result\n", + "print \"wavelength of light is\",round(lamda*10**7,3),\"*10**-7 metre\"\n", + "print \"answer varies due to rounding of errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 104" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "work function is 1.875 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "Kmax=3*10**-19; #work function(J)\n", + "lamda=3310*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "W0=(h*c/lamda)-Kmax; #work function(J)\n", + "W0=W0/e; #work function(eV)\n", + "\n", + "#Result\n", + "print \"work function is\",W0,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy emitted is 1.679 eV\n", + "threshold frequency is 5.317 *10**14 Hz\n", + "answers given in the book are wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "W0=2.2; #work function(eV)\n", + "lamda=3200*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "Kmax=((h*c/lamda)-(W0*e))/e; #energy emitted(eV)\n", + "new0=W0*e/h; #threshold frequency(Hz)\n", + "\n", + "#Result\n", + "print \"energy emitted is\",round(Kmax,3),\"eV\"\n", + "print \"threshold frequency is\",round(new0/10**14,3),\"*10**14 Hz\"\n", + "print \"answers given in the book are wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 105" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum kinetic energy is 3.9 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "W0=2.3; #work function(J)\n", + "lamda=2000*10**-10; #wavelength of light(metre)\n", + "\n", + "#Calculations\n", + "lamda0=h*c*10**10/(W0*e); #wavelength of light(angstrom)\n", + "Kmax=(h*c/(lamda*e))-W0; #maximum kinetic energy(eV)\n", + "\n", + "#Result\n", + "print \"maximum kinetic energy is\",round(Kmax,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 106" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum kinetic energy is 1.655 eV\n", + "stopping potential is 1.655 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "new=1.5*10**15; #frequency(sec-1)\n", + "new0=1.1*10**15; #frequency(sec-1)\n", + "\n", + "#Calculations\n", + "Kmax=h*(new-new0)/e; #maximum kinetic energy(eV)\n", + "sp=Kmax; #stopping potential(eV)\n", + "\n", + "#Result\n", + "print \"maximum kinetic energy is\",Kmax,\"eV\"\n", + "print \"stopping potential is\",sp,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 106" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of electrons is 5.41 *10**5 m/sec\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "W0=2.27*e; #work function(J)\n", + "lamda=4000*10**-10; #wavelength of light(metre)\n", + "m=9.1*10**-31;\n", + "\n", + "#Calculations\n", + "E=(h*c/lamda)-W0;\n", + "v=math.sqrt(2*E/m); #velocity of electrons(m/sec)\n", + "\n", + "#Result\n", + "print \"velocity of electrons is\",round(v/10**5,2),\"*10**5 m/sec\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 107" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "plancks constant is 6.57 *10**-34 J-s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda1=800*10**-10; #wavelength of light(metre)\n", + "lamda2=700*10**-10; #wavelength of light(metre)\n", + "E1=1.8; #energy(eV)\n", + "E2=4; #energy(eV)\n", + "\n", + "#Calculations\n", + "lamda=(1/lamda2)-(1/lamda1);\n", + "h=(E2-E1)*e/(c*lamda); #plancks constant(J s)\n", + "\n", + "#Result\n", + "print \"plancks constant is\",round(h*10**34,2),\"*10**-34 J-s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12, Page number 107" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum energy of photo electrons is 1.495 eV\n", + "answer given in the book is wrong\n", + "work function of tungsten is 5.38 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda=1800*10**-10; #wavelength of light(metre)\n", + "lamda0=2300*10**-10; #wavelength of light(metre)\n", + "\n", + "#Calculations\n", + "Emax=h*c*((1/lamda)-(1/lamda0))/e; #maximum energy of photo electrons(eV)\n", + "W0=h*c/(e*lamda0); #work function of tungsten(eV) \n", + "\n", + "#Result\n", + "print \"maximum energy of photo electrons is\",round(Emax,3),\"eV\"\n", + "print \"answer given in the book is wrong\"\n", + "print \"work function of tungsten is\",round(W0,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 108" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "threshold frequency is 0.44 *10**15 Hz\n", + "work function is 1.82 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planks constant(Js)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda0=6800*10**-10; #threshold wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "new0=c/lamda0; #threshold frequency(Hz)\n", + "W0=h*c/(e*lamda0); #work function(eV)\n", + "\n", + "#Result\n", + "print \"threshold frequency is\",round(new0/10**15,2),\"*10**15 Hz\"\n", + "print \"work function is\",round(W0,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14, Page number 109" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stopping potential is 1.404 volt\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.626*10**-34; #planks constant(Js)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda=2*10**-7; #wavelength(m)\n", + "e=1.602*10**-19; #charge(coulomb)\n", + "W0=4.8*e; #work function(eV)\n", + "\n", + "#Calculations\n", + "V0=(h*c/(lamda*e))-(W0/e); #stopping potential(volt)\n", + "\n", + "#Result\n", + "print \"stopping potential is\",round(V0,3),\"volt\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 15, Page number 109" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "stopping potential is 57.146 V\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planks constant(Js)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda=20*10**-9; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "W0=5.01*e; #work function(eV)\n", + "\n", + "#Calculations\n", + "V0=(h*c/(lamda*e))-(W0/e); #stopping potential(volt)\n", + "\n", + "#Result\n", + "print \"stopping potential is\",round(V0,3),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 109" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "work function is 1.75 eV\n", + "threshold frequency is 4.22 *10**14 cycles/sec\n", + "answers given in the book are wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.625*10**-34; #planks constant(Js)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda=5893*10**-10; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "Kmax=0.36; #energy(eV)\n", + "\n", + "#Calculations\n", + "W0=(h*c/(lamda*e))-Kmax; #work function(eV)\n", + "new0=W0*e/h; #threshold frequency(cycles/sec)\n", + "\n", + "#Result\n", + "print \"work function is\",round(W0,2),\"eV\"\n", + "print \"threshold frequency is\",round(new0*10**-14,2),\"*10**14 cycles/sec\"\n", + "print \"answers given in the book are wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17, Page number 110" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum velocity of electrons is 9.761 *10**5 m/sec\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "W0=5*e; #work function(J)\n", + "lamda=161*10**-9; #wavelength of light(metre)\n", + "m=9.1*10**-31; #mass(kg)\n", + "\n", + "#Calculations\n", + "E=(h*c/lamda)-W0;\n", + "vmax=math.sqrt(2*E/m); #velocity of electrons(m/sec)\n", + "\n", + "#Result\n", + "print \"maximum velocity of electrons is\",round(vmax/10**5,3),\"*10**5 m/sec\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18, Page number 110" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of photo-electrons is 7.497 *10**5 m/sec\n", + "retarding potential is 1.598 V\n", + "answers given in the book are wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "W0=1.24*e; #work function(J)\n", + "lamda=4.36*10**-7; #wavelength of light(metre)\n", + "m=9.1*10**-31; #mass(kg)\n", + "\n", + "#Calculations\n", + "E=(h*c/lamda)-W0;\n", + "v=math.sqrt(2*E/m); #velocity of photo-electrons(m/sec)\n", + "V0=m*v**2/(2*e); #retarding potential(V)\n", + "\n", + "#Result\n", + "print \"velocity of photo-electrons is\",round(v/10**5,3),\"*10**5 m/sec\"\n", + "print \"retarding potential is\",round(V0,3),\"V\"\n", + "print \"answers given in the book are wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 19, Page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "plancks constant is 6.85 *10**-34 J-s\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity(m/sec)\n", + "lamda=0.257*10**-10; #wavelength of light(metre)\n", + "m=9.1*10**-31; #mass(kg)\n", + "V=50*10**3; #voltage(V)\n", + "\n", + "#Calculations\n", + "h=e*V*lamda/c; #plancks constant(J-s)\n", + "\n", + "#Result\n", + "print \"plancks constant is\",round(h*10**34,2),\"*10**-34 J-s\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 20, Page number 111" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "plancks constant is 6.61 *10**-34 J-s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "V01=6.6; #reverse potential(V) \n", + "V02=16.5; #reverse potential(V) \n", + "e=1.602*10**-19; #charge(coulomb)\n", + "new1=2.2*10**15; #frequency(sec-1)\n", + "new2=4.6*10**15; #frequency(sec-1)\n", + "\n", + "#Calculations\n", + "h=(V02-V01)*e/(new2-new1); #plancks constant(J-s)\n", + "\n", + "#Result\n", + "print \"plancks constant is\",round(h*10**34,2),\"*10**-34 J-s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 21, Page number 112" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "plancks constant is 6.62 *10**-34 J-s\n", + "threshold frequency is 4.532 *10**14 sec-1\n", + "threshold wavelength is 6620.0 angstrom\n", + "answer for threshold wavelength given in the book varies due to rounding off errors\n", + "work function is 1.875 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "lamda=3310*10**-10; #wavelength(m)\n", + "lamda1=5000*10**-10; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "Emax=3*10**-19; #energy(J)\n", + "E1=0.972*10**-19; #energy(J)\n", + "\n", + "#Calculations\n", + "h=lamda*lamda1*(Emax-E1)/(c*(lamda1-lamda)); #plancks constant(J-s)\n", + "new0=(c/lamda)-((Emax/h)); #threshold frequency(sec-1)\n", + "lamda0=c*10**10/new0; #threshold wavelength(angstrom)\n", + "W=h*new0/e; #work function(eV)\n", + "\n", + "#Result\n", + "print \"plancks constant is\",round(h*10**34,2),\"*10**-34 J-s\"\n", + "print \"threshold frequency is\",round(new0*10**-14,3),\"*10**14 sec-1\"\n", + "print \"threshold wavelength is\",lamda0,\"angstrom\"\n", + "print \"answer for threshold wavelength given in the book varies due to rounding off errors\"\n", + "print \"work function is\",W,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 22, Page number 113" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of electrons is 3.6 *10**5 m/sec\n", + "work function is 2.106 eV\n", + "answer for work function given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "v1=1.0*10**6; #velocity(m/sec)\n", + "lamda1=2.5*10**-7; #wavelength(m)\n", + "lamda2=5.0*10**-7; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "x=2*h*c*(lamda1-lamda2)/(m*lamda1*lamda2);\n", + "v2=math.sqrt(x+(v1**2)); #velocity of electrons(m/sec)\n", + "W=((h*c/lamda1)-(m*v1**2/2))/e; #work function(eV)\n", + "\n", + "#Result\n", + "print \"velocity of electrons is\",round(v2*10**-5,1),\"*10**5 m/sec\"\n", + "print \"work function is\",round(W,3),\"eV\"\n", + "print \"answer for work function given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 23, Page number 114" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 3.003 angstrom\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "lamda=3*10**-10; #wavelength(m)\n", + "theta=30*math.pi/180; #angle(radian)\n", + "\n", + "#Calculations\n", + "lamda_dash=lamda+(2*h*(math.sin(theta/2)**2)/(m0*c)); #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda_dash*10**10,3),\"angstrom\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 24, Page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.039 angstrom\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "lamda_dash=0.022*10**-10; #wavelength(m)\n", + "theta=45*math.pi/180; #angle(radian)\n", + "\n", + "#Calculations\n", + "lamda=lamda_dash-(h*(1-math.cos(theta)/(m0*c))); #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**10,3),\"angstrom\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 25, Page number 115" + ] + }, + { + "cell_type": "code", + "execution_count": 115, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of electron after interaction is 0.51 MeV\n", + "energy of photon after interaction is 0.51 MeV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "E=1.02; #energy(MeV)\n", + "theta=90*math.pi/180; #angle(radian)\n", + "\n", + "#Calculations\n", + "delta_lamda=2*h*(math.sin(theta/2)**2)/(m0*c); #wavelength(m)\n", + "delta_new=c/delta_lamda; #change in frequency(Hz)\n", + "deltaE=h*delta_new*10**-6/e; #change in energy of photon(MeV)\n", + "Ep=E-deltaE; #energy of photon after interaction(MeV) \n", + "\n", + "#Result\n", + "print \"energy of electron after interaction is\",round(deltaE,2),\"MeV\"\n", + "print \"energy of photon after interaction is\",round(Ep,2),\"MeV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 26, Page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 119, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.0485 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.624*10**-34; #planks constant(Js)\n", + "theta=180*math.pi/180; #angle(radian)\n", + "\n", + "#Calculations\n", + "delta_lamda=2*h*math.sin(theta/2)**2/(m0*c); #change in wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(delta_lamda*10**10,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 27, Page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 123, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency after collision is 2.414 *10**19 Hz\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.624*10**-34; #planks constant(Js)\n", + "new=3*10**19; #frequency(Hz)\n", + "\n", + "#Calculations\n", + "delta_lamda=h/(m0*c); #change in wavelength(m)\n", + "newdash=(1/new)+(delta_lamda/c); \n", + "new_dash=1/newdash; #frequency after collision(Hz)\n", + "\n", + "#Result\n", + "print \"frequency after collision is\",round(new_dash*10**-19,3),\"*10**19 Hz\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 28, Page number 116" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of scattered ray is 1.0485 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.624*10**-34; #planks constant(Js)\n", + "lamda=1; #wavelength(angstrom)\n", + "\n", + "#Calculations\n", + "delta_lamda=2*h*10**10/(m0*c); #change in wavelength(angstrom)\n", + "lamda=lamda+delta_lamda; #wavelength of scattered ray(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength of scattered ray is\",round(lamda,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 29, Page number 117" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.024 angstrom\n", + "energy of photon is 81 *10**-15 joule\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.624*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "delta_lamda=h*10**10/(m0*c); #wavelength(angstrom)\n", + "E=m0*c**2; #energy of photon(joule)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(delta_lamda,3),\"angstrom\"\n", + "print \"energy of photon is\",int(E*10**15),\"*10**-15 joule\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 30, Page number 117" + ] + }, + { + "cell_type": "code", + "execution_count": 155, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of scattered radiation is 1.83 angstrom\n", + "velocity of recoil electron is 1.98 *10**6 m/sec\n", + "answer for velocity given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "theta=30*math.pi/180; #angle(radian)\n", + "lamda=1.827*10**-10; #wavelength(angstrom)\n", + "\n", + "#Calculations\n", + "lamda_sr=h/(m0*c); \n", + "lamda_dash=lamda+(lamda_sr*(1-math.cos(theta))); #wavelength of scattered radiation(m) \n", + "lamda_dash=round(lamda_dash*10**10,2)*10**-10; #wavelength of scattered radiation(m)\n", + "E=h*c*(lamda_dash-lamda)/(lamda*lamda_dash); #energy(joule)\n", + "x=1+(E/(m0*c**2));\n", + "v=c*math.sqrt(1-((1/x)**2)); #velocity of recoil electron(m/sec)\n", + "\n", + "#Result\n", + "print \"wavelength of scattered radiation is\",lamda_dash*10**10,\"angstrom\"\n", + "print \"velocity of recoil electron is\",round(v/10**6,2),\"*10**6 m/sec\"\n", + "print \"answer for velocity given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 31, Page number 118" + ] + }, + { + "cell_type": "code", + "execution_count": 172, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of radiation is 4.844 *10**-12 m\n", + "answer varies due to rounding of errors\n", + "energy is 4.0725 *10**-14 joule\n", + "direction of recoil electron is 26 degrees 36 minutes\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "theta=90*math.pi/180; #angle(radian)\n", + "E=510*10**3; #energy(eV)\n", + "\n", + "#Calculations\n", + "lamda=h*c/(E*e); \n", + "lamda_dash=lamda+(h*(1-math.cos(theta))/(m0*c)); #wavelength of radiation(m) \n", + "E=h*c*(lamda_dash-lamda)/(lamda*lamda_dash); #energy(joule)\n", + "x=h/(lamda*m0*c);\n", + "tanphi=1/(math.tan(theta/2)*(1+x));\n", + "phi=math.atan(tanphi); #direction of recoil electron(radian)\n", + "phi=phi*180/math.pi; #direction of recoil electron(degrees)\n", + "phim=60*(phi-int(phi)); #angle(minutes)\n", + "\n", + "#Result\n", + "print \"wavelength of radiation is\",round(lamda_dash*10**12,3),\"*10**-12 m\"\n", + "print \"answer varies due to rounding of errors\"\n", + "print \"energy is\",round(E*10**14,4),\"*10**-14 joule\"\n", + "print \"direction of recoil electron is\",int(phi),\"degrees\",int(phim),\"minutes\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 32, Page number 119" + ] + }, + { + "cell_type": "code", + "execution_count": 180, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of photon is 2.024 angstrom\n", + "energy of recoil electron is 1.182 *10**-17 joule\n", + "answer varies due to rounding of errors\n", + "angle is 44 degrees 39 minutes\n", + "answer for angle given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "theta=90*math.pi/180; #angle(radian)\n", + "lamda=2*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "lamda_dash=lamda+(h*(1-math.cos(theta))/(m0*c)); #wavelength of photon(m)\n", + "K=h*c*(lamda_dash-lamda)/(lamda*lamda_dash); #energy of recoil electron(joule)\n", + "tanphi=lamda*math.sin(theta)/(lamda_dash-(lamda*math.cos(theta))); \n", + "phi=math.atan(tanphi)*180/math.pi; #angle(degrees)\n", + "phim=60*(phi-int(phi)); #angle(minutes)\n", + "\n", + "#Result\n", + "print \"wavelength of photon is\",round(lamda_dash*10**10,3),\"angstrom\"\n", + "print \"energy of recoil electron is\",round(K*10**17,3),\"*10**-17 joule\"\n", + "print \"answer varies due to rounding of errors\" \n", + "print \"angle is\",int(phi),\"degrees\",int(phim),\"minutes\"\n", + "print \"answer for angle given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 33, Page number 120" + ] + }, + { + "cell_type": "code", + "execution_count": 185, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "compton shift is 1.255 angstrom\n", + "energy of radiation is 0.0099 MeV\n", + "angle of recoil of electron is 44 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.63*10**-34; #planks constant(Js)\n", + "theta=60*math.pi/180; #angle(radian)\n", + "E=0.01*10**6; #energy(eV)\n", + "\n", + "#Calculations\n", + "lamda=h*c/(E*e); #wavelength of photon(m)\n", + "lamda_dash=lamda+(h*(1-math.cos(theta))/(m0*c)); #compton shift(m)\n", + "E_sp=h*c/(10**6*e*lamda_dash); #energy of radiation(MeV)\n", + "tanphi=lamda/lamda_dash; \n", + "phi=math.atan(tanphi)*180/math.pi; #angle of recoil of electron(degrees)\n", + "\n", + "#Result\n", + "print \"compton shift is\",round(lamda_dash*10**10,3),\"angstrom\"\n", + "print \"energy of radiation is\",round(E_sp,4),\"MeV\"\n", + "print \"angle of recoil of electron is\",int(phi),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 34, Page number 121" + ] + }, + { + "cell_type": "code", + "execution_count": 202, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of scattered beam is 1.024 angstrom\n", + "kinetic energy of recoiling electron is 291.1 eV\n", + "answer for energy given in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "h=6.624*10**-34; #planks constant(Js)\n", + "theta=90*math.pi/180; #angle(radian)\n", + "lamda=1*10**-10; #wavelength of photon(m)\n", + "\n", + "#Calculations\n", + "lamda_dash=lamda+(h*(1-math.cos(theta))/(m0*c)); #wavelength of scattered beam(m)\n", + "lamda_dash=round(lamda_dash*10**10,3)*10**-10;\n", + "K=h*c*(lamda_dash-lamda)/(e*lamda*lamda_dash); #kinetic energy of recoiling electron(eV)\n", + "\n", + "#Result\n", + "print \"wavelength of scattered beam is\",lamda_dash*10**10,\"angstrom\"\n", + "print \"kinetic energy of recoiling electron is\",round(K,1),\"eV\"\n", + "print \"answer for energy given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 35, Page number 122" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of electron is 2.19 *10**6 m/sec\n", + "radius of bohr's orbit is 0.5273 angstrom\n", + "time taken by electron is 1.51 *10**-16 sec\n", + "rydberg constant is 1.101 *10**7 m-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "epsilon0=8.86*10**-12; #permittivity of free space(coulomb**2/nt-m**2)\n", + "\n", + "#Calculations\n", + "v=e**2/(2*h*epsilon0); #velocity of electron(m/sec)\n", + "r1=h**2*epsilon0/(math.pi*m*e**2); #radius of bohr's orbit(m)\n", + "T=2*math.pi*r1/v; #time taken by electron(sec)\n", + "R=m*e**4/(8*epsilon0**2*c*h**3); #rydberg constant(m-1)\n", + "\n", + "#Result\n", + "print \"velocity of electron is\",round(v/10**6,2),\"*10**6 m/sec\"\n", + "print \"radius of bohr's orbit is\",round(r1*10**10,4),\"angstrom\"\n", + "print \"time taken by electron is\",round(T*10**16,2),\"*10**-16 sec\"\n", + "print \"rydberg constant is\",round(R/10**7,3),\"*10**7 m-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 36, Page number 122" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of second bohr orbit is 2.1094 angstrom\n", + "energy of electron is -3.406 eV\n", + "answer given in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=2;\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "epsilon0=8.86*10**-12; #permittivity of free space(coulomb**2/nt-m**2)\n", + "\n", + "#Calculations\n", + "rn=n**2*h**2*epsilon0/(math.pi*m*e**2); #radius of second bohr orbit(m)\n", + "En=-m*e**4/(e*8*n**2*h**2*epsilon0**2); #energy of electron(eV)\n", + "\n", + "#Result\n", + "print \"radius of second bohr orbit is\",round(rn*10**10,4),\"angstrom\"\n", + "print \"energy of electron is\",round(En,3),\"eV\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 37, Page number 123" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity in hydrogen atom is 1/ 137 c\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec) \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "epsilon0=8.85*10**-12; #permittivity of free space(coulomb**2/nt-m**2)\n", + "\n", + "#Calculations\n", + "v=e**2/(2*h*epsilon0*c); #velocity in hydrogen atom\n", + "\n", + "#Result\n", + "print \"velocity in hydrogen atom is 1/\",int(round(1/v)),\"c\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 38, Page number 123" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "difference in energy levels is 2.1 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec) \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "lamda=590*10**-9; #wavelength(m)\n", + "\n", + "#Calculations\n", + "E=h*c/(e*lamda); #difference in energy levels(eV)\n", + " \n", + "#Result\n", + "print \"difference in energy levels is\",round(E,1),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 39, Page number 124" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of electron is 10.24 eV\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=1;\n", + "n2=2;\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "epsilon0=8.85*10**-12; #permittivity of free space(coulomb**2/nt-m**2)\n", + "\n", + "#Calculations\n", + "E=3*m*e**4/(e*32*h**2*epsilon0**2); #energy of electron(eV)\n", + "\n", + "#Result\n", + "print \"energy of electron is\",round(E,2),\"eV\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 40, Page number 124" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of electron is -13.626 eV\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "epsilon0=8.86*10**-12; #permittivity of free space(coulomb**2/nt-m**2)\n", + "rn=0.528*10**-10; #radius of orbit(m)\n", + "\n", + "#Calculations\n", + "n2=rn*math.pi*m*e**2/(h**2*epsilon0);\n", + "n=math.sqrt(n2);\n", + "E1=-m*e**4/(e*8*h**2*epsilon0**2); #energy of electron(eV)\n", + "\n", + "#Result\n", + "print \"energy of electron is\",round(E1,3),\"eV\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example number 41, Page number 125" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "speed of electron is 2.18 *10**6 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9.1*10**-31; #mass(kg)\n", + "epsilon0=8.86*10**-12; #permittivity of free space(coulomb**2/nt-m**2)\n", + "r=0.53*10**-10; #radius of orbit(m)\n", + "\n", + "#Calculations\n", + "v=math.sqrt(1/(4*math.pi*epsilon0))*e/math.sqrt(m*r); #speed of electron(m/s)\n", + "\n", + "#Result\n", + "print \"speed of electron is\",round(v/10**6,2),\"*10**6 m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 42, Page number 125" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 4861 *10**-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=2;\n", + "n2=3;\n", + "n3=4;\n", + "R=1; #assume\n", + "lamda1=6563*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "new1=R*((1/n1**2)-(1/n2**2));\n", + "new2=R*((1/n1**2)-(1/n3**2));\n", + "lamda2=new1*lamda1/new2; #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",int(lamda2*10**10),\"*10**-10 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 43, Page number 125" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of 1st member is 1215.37 angstrom\n", + "answer given in the book varies due to rounding off errors\n", + "wavelength of 2nd member is 1025.5 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "R=1; #assume\n", + "lamda1=6563; #wavelength(angstrom)\n", + "\n", + "#Calculations\n", + "new1=R*((1/n2**2)-(1/n3**2));\n", + "new2=R*((1/n1**2)-(1/n2**2));\n", + "lamda2=new1*lamda1/new2; #wavelength of 1st member(angstrom)\n", + "new3=R*((1/n1**2)-(1/n3**2));\n", + "lamda3=new1*lamda1/new3; #wavelength of 2nd member(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength of 1st member is\",round(lamda2,2),\"angstrom\"\n", + "print \"answer given in the book varies due to rounding off errors\"\n", + "print \"wavelength of 2nd member is\",round(lamda3,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 44, Page number 126" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rydberg constant is 109.76 *10**5 per m\n", + "answer given in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=2;\n", + "n2=3;\n", + "lamda=6560*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "x=(1/n1**2)-(1/n2**2);\n", + "R=(1/(x*lamda)); #rydberg constant(per m)\n", + "\n", + "#Result\n", + "print \"rydberg constant is\",round(R/10**5,2),\"*10**5 per m\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 45, Page number 126" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rydberg constant is 109.7 *10**5 metre -1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=2;\n", + "n2=4;\n", + "lamda=4861*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "x=(1/n1**2)-(1/n2**2);\n", + "R=(1/(x*lamda)); #rydberg constant(per m)\n", + "\n", + "#Result\n", + "print \"rydberg constant is\",round(R/10**5,1),\"*10**5 metre -1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 46, Page number 127" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 3646 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=2;\n", + "R=1.097*10**7; #rydberg constant(per m)\n", + "\n", + "#Calculations\n", + "lamda=n**2*10**10/R; #wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength is\",int(lamda),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 47, Page number 127" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of electron is 6540 *10**12 Hz\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.625*10**-34; #planks constant(Js)\n", + "epsilon0=8.854*10**-12; #permittivity of free space(coulomb**2/nt-m**2)\n", + "n=1;\n", + "\n", + "#Calculations\n", + "new=m*e**4/(4*epsilon0**2*n**3*h**3); #frequency of electron(Hz)\n", + "\n", + "#Result\n", + "print \"frequency of electron is\",int(new/10**12),\"*10**12 Hz\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 48, Page number 127" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rydberg constant is 1.097 *10**7 metre -1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n=2;\n", + "lamda=3646*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "R=n**2/lamda; #rydberg constant(metre -1)\n", + "\n", + "#Result\n", + "print \"rydberg constant is\",round(R/10**7,3),\"*10**7 metre -1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 49, Page number 128" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rydberg constant is 1.0971 *10**7 metre -1\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=3;\n", + "n2=4;\n", + "lamda=1.875*10**-6; #wavelength(m)\n", + "\n", + "#Calculations\n", + "x=(1/n1**2)-(1/n2**2);\n", + "R=(1/(x*lamda)); #rydberg constant(per m)\n", + "\n", + "#Result\n", + "print \"rydberg constant is\",round(R/10**7,4),\"*10**7 metre -1\"\n", + "print \"answer given in the book is wrong\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter4.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter4.ipynb new file mode 100644 index 00000000..e840f21f --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter4.ipynb @@ -0,0 +1,861 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 4: Matter Waves" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 153" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-Broglie wavelength in 1st case is 6.625e-34 m\n", + "de-Broglie wavelength in 2nd case is 1.8 angstrom\n", + "de-Broglie wavelength in 3rd case is 3.9 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.602*10**-19; #charge(coulomb)\n", + "me=9.11*10**-31; #mass(kg)\n", + "h=6.625*10**-34; #planks constant(Js)\n", + "M=0.05; #mass(kg)\n", + "v=20; #velocity(m/sec)\n", + "vp=2200; #velocity of proton(m/sec)\n", + "mp=1.67*10**-27; #mass of proton(kg)\n", + "E=10; #energy(eV)\n", + "\n", + "#Calculations\n", + "lamda1=h/(M*v); #de-Broglie wavelength in 1st case(m)\n", + "lamda2=h/(mp*vp); #de-Broglie wavelength in 2nd case(m)\n", + "lamda3=h/math.sqrt(2*me*e*E); #de-Broglie wavelength in 3rd case(m)\n", + "\n", + "#Result\n", + "print \"de-Broglie wavelength in 1st case is\",lamda1,\"m\"\n", + "print \"de-Broglie wavelength in 2nd case is\",round(lamda2*10**10,1),\"angstrom\"\n", + "print \"de-Broglie wavelength in 3rd case is\",round(lamda3*10**10,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 154" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-Broglie wavelength in 1st case is 1.225 angstrom\n", + "de-Broglie wavelength in 2nd case is 0.1225 angstrom\n", + "de-Broglie wavelength in 3rd case is 0.15313 angstrom\n", + "answer given in the book is wrong\n", + "de-Broglie wavelength in 4th case is 0.1225 angstrom\n", + "de-Broglie wavelength in 5th case is 0.3963 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planks constant(Js)\n", + "vp=10**4; #velocity of proton(m/sec)\n", + "mp=1.673*10**-27; #mass of proton(kg)\n", + "V1=100; #potential difference in 1st case(V)\n", + "V2=10000; #potential difference in 2nd case(V)\n", + "V3=6400; #potential difference in 3rd case(V)\n", + "\n", + "#Calculations\n", + "lamda1=12.25/math.sqrt(V1); #de-Broglie wavelength in 1st case(angstrom)\n", + "lamda2=12.25/math.sqrt(V2); #de-Broglie wavelength in 2nd case(angstrom)\n", + "lamda3=12.25/math.sqrt(V3); #de-Broglie wavelength in 3rd case(angstrom)\n", + "lamda4=12.25/math.sqrt(V2); #de-Broglie wavelength in 4th case(angstrom)\n", + "lamda5=h*10**10/(mp*vp); #de-Broglie wavelength in 5th case(angstrom)\n", + "\n", + "#Result\n", + "print \"de-Broglie wavelength in 1st case is\",lamda1,\"angstrom\"\n", + "print \"de-Broglie wavelength in 2nd case is\",lamda2,\"angstrom\"\n", + "print \"de-Broglie wavelength in 3rd case is\",round(lamda3,5),\"angstrom\"\n", + "print \"answer given in the book is wrong\"\n", + "print \"de-Broglie wavelength in 4th case is\",lamda4,\"angstrom\"\n", + "print \"de-Broglie wavelength in 5th case is\",round(lamda5,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 154" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-Broglie wavelength of proton is 2.64 *10**-14 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "mp=1.67*10**-27; #mass of proton(kg)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "v=c/20; #velocity of proton(m/sec)\n", + "lamda=h/(mp*v); #de-Broglie wavelength of proton(m)\n", + "\n", + "#Result\n", + "print \"de-Broglie wavelength of proton is\",round(lamda*10**14,2),\"*10**-14 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 155" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of neutron is 8.13 *10**-2 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "m=1.674*10**-27; #mass of proton(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "lamda=10**-10; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "E=h**2/(2*e*m*lamda**2); #energy of neutron(eV)\n", + "\n", + "#Result\n", + "print \"energy of neutron is\",round(E*10**2,2),\"*10**-2 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 155" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of neutron is 167217.6 eV\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "m=9.1*10**-31; #mass of proton(kg)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "lamda=3*10**-12; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "E=h**2/(2*e*m*lamda**2); #energy of neutron(eV)\n", + "\n", + "#Result\n", + "print \"energy of neutron is\",round(E,1),\"eV\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 155" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage is 934.9 V\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "m=9.1*10**-31; #mass of proton(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "lamda=0.4*10**-10; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "V=h**2/(2*m*e*lamda**2); #voltage(V)\n", + "\n", + "#Result\n", + "print \"voltage is\",round(V,1),\"V\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 156" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity is 3.97 *10**3 m/sec\n", + "kinetic energy of particle is 0.08225 eV\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "m=1.67*10**-27; #mass of proton(kg)\n", + "h=6.63*10**-34; #planks constant(Js)\n", + "lamda=10**-10; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "v=h/(m*lamda); #velocity(m/sec)\n", + "E=m*v**2/(2*e); #kinetic energy of particle(eV)\n", + "\n", + "#Result\n", + "print \"velocity is\",round(v/10**3,2),\"*10**3 m/sec\"\n", + "print \"kinetic energy of particle is\",round(E,5),\"eV\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 156" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of photon is 12.4 angstrom\n", + "wavelength of electron is 0.39 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "E=1000; #energy(eV) \n", + "m=9.1*10**-31; #mass of proton(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "lamdap=h*c/(E*e); #wavelength of photon(m)\n", + "lamdae=h/math.sqrt(2*m*e*E); #wavelength of electron(m)\n", + "\n", + "#Result\n", + "print \"wavelength of photon is\",round(lamdap*10**10,1),\"angstrom\"\n", + "print \"wavelength of electron is\",round(lamdae*10**10,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 157" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy is 2.4 *10**-15 J\n", + "wavelength of photo-electron is 0.1 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m=9.1*10**-31; #mass of proton(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "lamda=0.82*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "E=h*c/lamda; #energy(J)\n", + "lamda=h/math.sqrt(2*m*E); #wavelength of photo-electron(m)\n", + "\n", + "#Result\n", + "print \"energy is\",round(E*10**15,1),\"*10**-15 J\"\n", + "print \"wavelength of photo-electron is\",round(lamda*10**10,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 157" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of quantum is 0.0242 angstrom\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m=9.1*10**-31; #mass of proton(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "lamda=h/(m*c); #wavelength of quantum(m)\n", + "\n", + "#Result\n", + "print \"wavelength of quantum is\",round(lamda*10**10,4),\"angstrom\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 158" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength is 2.86 *10**-18 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "E=10**14; #kinetic energy(eV)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=1.675*10**-27; #mass of proton(kg)\n", + "h=6.625*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "v=math.sqrt(2*e*E/m); #velocity(m/sec) \n", + "lamda=h/(m*v); #de-broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength is\",round(lamda*10**18,2),\"*10**-18 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 12, Page number 158" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength is 7.998 *10**-15 m\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "E=12.8*10**6; #kinetic energy(eV)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=1.675*10**-27; #mass of proton(kg)\n", + "h=6.625*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "v=math.sqrt(2*e*E/m); #velocity(m/sec) \n", + "lamda=h/(m*v); #de-broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength is\",round(lamda*10**15,3),\"*10**-15 m\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 13, Page number 158" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength is 0.0004 angstrom\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "E=12.8*10**6; #kinetic energy(eV)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "mp=1836*m; #mass of proton(kg) \n", + "h=6.625*10**-34; #planks constant(Js)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "E=m*c**2; #energy(J)\n", + "v=math.sqrt(2*E/mp); #velocity(m/sec) \n", + "lamda=h/(mp*v); #de-broglie wavelength(m)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength is\",round(lamda*10**10,4),\"angstrom\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 14, Page number 159" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 1.777 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T=300; #temperature(K)\n", + "m=1.67*10**-27; #mass of electron(kg)\n", + "h=6.60*10**-34; #planks constant(Js)\n", + "k=8.6*10**-5; #boltzmann constant(eV deg-1)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "lamda=h/math.sqrt(2*m*e*k*T); #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**10,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 16, Page number 160" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength is 4.047 *10**11 angstrom\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "E=0.512*10**6; #kinetic energy(eV)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=1.673*10**-27; #mass of proton(kg)\n", + "h=6.63*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "v=2*e*E/m; #velocity(m/sec) \n", + "lamda=h*10**10/(m*v); #de-broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength is\",round(lamda*10**11,3),\"*10**11 angstrom\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 17, Page number 160" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength is 0.006348 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "E=0.512*10**6; #rest mass energy(eV)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "KE=1.512*10**6; #kinetic energy(eV) \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9.1*10**-31; #mass of proton(kg)\n", + "h=6.63*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "E1=(E+KE)*e; #energy(J)\n", + "m=E1/c**2; #mass(kg)\n", + "v=math.sqrt(c**2*(1-(m0/m)**2)); #velocity(m/sec)\n", + "lamda=h*10**10/(m*v); #de-broglie wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength is\",round(lamda,6),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 18, Page number 161" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength is 1.45 *10**-10 metre\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "k=1.38*10**-23; #boltzmann constant\n", + "T=300; #temperature(K)\n", + "m0=1.67*10**-27; #mass of proton(kg)\n", + "h=6.6*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "lamda=h/math.sqrt(3*m0*k*T); #de-broglie wavelength(metre)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength is\",round(lamda*10**10,2),\"*10**-10 metre\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 19, Page number 162" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 1.78 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "k=1.38*10**-23; #boltzmann constant\n", + "T=300; #temperature(K)\n", + "mn=1.67*10**-27; #mass of proton(kg)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "\n", + "#Calculations\n", + "E=k*T; #energy(J)\n", + "p=math.sqrt(2*mn*E); \n", + "d=h*10**10/p; #interplanar spacing(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 20, Page number 162" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 0.4 angstrom\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "m=9*10**-31; #mass of proton(kg)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "V=344; #voltage(V)\n", + "h=6.62*10**-34; #planks constant(Js)\n", + "theta=60*math.pi/180; #angle(radian)\n", + "\n", + "#Calculations\n", + "d=h*10**10/(2*math.sin(theta)*math.sqrt(2*m*e*V)); #spacing of crystal(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(d,1),\"angstrom\"\n", + "print \"answer given in the book is wrong\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter5.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter5.ipynb new file mode 100644 index 00000000..7dd9881a --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter5.ipynb @@ -0,0 +1,480 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 5: Uncertainity Principle" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 177" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in momentum is 1.65e-24 kg m/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #plancks constant(J s)\n", + "deltax=4*10**-10; #uncertainity(m)\n", + "\n", + "#Calculations\n", + "delta_px=h/deltax; #uncertainity in momentum(kg m/sec)\n", + "\n", + "#Result\n", + "print \"uncertainity in momentum is\",delta_px,\"kg m/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 177" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in position is 0.02418 m\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #plancks constant(J s)\n", + "m=9.1*10**-31; #mass(kg)\n", + "v=600; #speed(m/s)\n", + "deltapx=(0.005/100)*m*v; #uncertainity in momentum(kg m/sec)\n", + "\n", + "#Calculations\n", + "deltax=h/deltapx; #uncertainity in position(m)\n", + "\n", + "#Result\n", + "print \"uncertainity in position is\",round(deltax,5),\"m\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 177" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in momentum is 6.63e-23 kg m/sec\n", + "uncertainity in velocity is 7.286 *10**7 m/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #plancks constant(J s)\n", + "deltax=0.1*10**-10; #uncertainity(m)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "\n", + "#Calculations\n", + "deltap=h/deltax; #uncertainity in momentum(kg m/sec)\n", + "deltav=deltap/m0; #uncertainity in velocity(m/sec) \n", + "\n", + "#Result\n", + "print \"uncertainity in momentum is\",deltap,\"kg m/sec\"\n", + "print \"uncertainity in velocity is\",round(deltav/10**7,3),\"*10**7 m/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 178" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in velocity is 1835\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "me=9.1*10**-31; #mass of electron(kg)\n", + "mp=1.67*10**-27; #mass of proton(kg)\n", + "\n", + "#Calculations\n", + "deltavebydeltavp=mp/me; #uncertainity in velocity\n", + "\n", + "#Result\n", + "print \"uncertainity in velocity is\",int(deltavebydeltavp)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 178" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "smallest possible uncertainity in position is 0.0388 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #plancks constant(J s)\n", + "v=3*10**7; #velocity(m/sec)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "m0=9*10**-31; #mass(kg)\n", + "\n", + "#Calculations\n", + "deltaxmin=h*math.sqrt(1-(v**2/c**2))/(2*math.pi*m0*v); #smallest possible uncertainity in position(m)\n", + "\n", + "#Result\n", + "print \"smallest possible uncertainity in position is\",round(deltaxmin*10**10,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 179" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum uncertainity in velocity is 7.3 *10**5 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #plancks constant(J s)\n", + "deltapmax=10**-9; #uncertainity in momentum(kg m/sec)\n", + "m=9*10**-31; #mass(kg)\n", + "\n", + "#Calculations\n", + "deltapmin=h/deltapmax; #smallest possible uncertainity in momentum(kg m/sec)\n", + "deltavxmin=deltapmin/m; #minimum uncertainity in velocity(m/s) \n", + "\n", + "#Result\n", + "print \"minimum uncertainity in velocity is\",round(deltavxmin/10**5,1),\"*10**5 m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 179" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time required is 1.9 *10**-8 second\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "c=3*10**8; #velocity of light(m/sec)\n", + "lamda=6000*10**-10; #wavelength(m)\n", + "dlamda=10**-4*10**-10; #width(m)\n", + "\n", + "#Calculations\n", + "deltat=lamda**2/(2*math.pi*c*dlamda); #time required(second)\n", + "\n", + "#Result\n", + "print \"time required is\",round(deltat*10**8,1),\"*10**-8 second\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 180" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in position is 3.381 *10**-6 m\n", + "answer given in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #plancks constant(J s)\n", + "m=9.1*10**-31; #mass(kg)\n", + "v=3.5*10**5; #speed(m/s)\n", + "deltap=(0.0098/100)*m*v; #uncertainity in momentum(kg m/sec)\n", + "\n", + "#Calculations\n", + "deltax=h/(2*math.pi*deltap); #uncertainity in position(m)\n", + "\n", + "#Result\n", + "print \"uncertainity in position is\",round(deltax*10**6,3),\"*10**-6 m\"\n", + "print \"answer given in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 180" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in momentum is 5.276 *10**-20 kg m/sec\n", + "kinetic energy of electron is 9559.1 MeV\n", + "answer for kinetic energy given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #plancks constant(J s)\n", + "m0=9.1*10**-31; #mass(kg)\n", + "deltax=2*10**-15; #uncertainity in position(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "deltap=h/(2*math.pi*deltax); #uncertainity in momentum(kg m/sec)\n", + "K=deltap**2/(2*m0*e); #kinetic energy of electron(eV)\n", + "\n", + "#Result\n", + "print \"uncertainity in momentum is\",round(deltap*10**20,3),\"*10**-20 kg m/sec\"\n", + "print \"kinetic energy of electron is\",round(K/10**6,1),\"MeV\"\n", + "print \"answer for kinetic energy given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 180" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum uncertainity in momentum is 1.05e-20 kg m/sec\n", + "minimum kinetic energy is 2.06 *10**5 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "chi=1.05*10**-34; #plancks constant(J s)\n", + "deltaxmax=2*5*10**-15; #uncertainity in momentum(kg m/sec)\n", + "m=1.67*10**-27; #mass(kg)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "deltapmin=chi/deltaxmax; #minimum uncertainity in momentum(kg m/sec)\n", + "Emin=deltapmin**2/(2*m*e); #minimum kinetic energy(eV)\n", + "\n", + "#Result\n", + "print \"minimum uncertainity in momentum is\",deltapmin,\"kg m/sec\"\n", + "print \"minimum kinetic energy is\",round(Emin/10**5,2),\"*10**5 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 181" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "angular orbital position is 10 radian\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=5/100; #error\n", + "h=1; #assume\n", + "\n", + "#Calculations\n", + "deltaJ=e*2*h; #uncertainity in angular momentum\n", + "delta_theta=h/deltaJ; #angular orbital position(radian)\n", + "\n", + "#Result\n", + "print \"angular orbital position is\",int(delta_theta),\"radian\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter6.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter6.ipynb new file mode 100644 index 00000000..c0b5df30 --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter6.ipynb @@ -0,0 +1,557 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 6: Schroedinger Wave Equation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 211" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "least energy is 37.65 eV\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #plancks constant(J sec)\n", + "m=9.11*10**-31; #mass(kg)\n", + "a=10**-10; #width of box(m)\n", + "e=1.602*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "E1=(h**2)/(8*m*e*a**2); #least energy(eV)\n", + "\n", + "#Result\n", + "print \"least energy is\",round(E1,2),\"eV\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 211" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "probability of finding the particle is 0.4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "delta_x=5*10**-10; #interval(m)\n", + "a=25*10**-10; #width(m)\n", + "\n", + "#Calculations\n", + "P=2*delta_x/a; #probability of finding the particle\n", + "\n", + "#Result\n", + "print \"probability of finding the particle is\",P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 212" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "probability of finding the particle is 19.84 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import quad\n", + "\n", + "#Variable declaration \n", + "a=1; #assume\n", + "\n", + "#Calculations\n", + "def zintg(x):\n", + " return (2/a)*(1/2)*(1-math.cos(2*math.pi*x/a))\n", + "\n", + "P1=quad(zintg,0.45,0.55)[0]\n", + "\n", + "#Result\n", + "print \"probability of finding the particle is\",round(P1*100,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 213" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " least energy is 6 eV\n", + "energy in 2nd excited state is 24 eV\n", + "energy in 3rd excited state is 54 eV\n", + "difference of energy between 2nd and 1st excited states is 18 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planks constant(Js)\n", + "m=9.1*10**-31; #mass(kg)\n", + "a=2.5*10**-10; #width(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "n1=1; \n", + "n2=2;\n", + "n3=3; #energy states\n", + "\n", + "#Calculations\n", + "E1=n1**2*(h**2)/(8*m*e*a**2); #least energy(eV)\n", + "E2=n2**2*E1; #energy in 2nd excited state(eV)\n", + "E3=n3**2*E1; #energy in 3rd excited state(eV)\n", + "delta_E=E2-E1; #difference of energy between 2nd and 1st excited states(eV)\n", + "\n", + "#Result\n", + "print \"least energy is\",int(E1),\"eV\"\n", + "print \"energy in 2nd excited state is\",int(E2),\"eV\"\n", + "print \"energy in 3rd excited state is\",int(E3),\"eV\"\n", + "print \"difference of energy between 2nd and 1st excited states is\",int(delta_E),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 213" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-Broglie wavelength of first three energy states are 20 angstrom 10 angstrom 6.67 angstrom\n", + "energies of first three energy states are 0.38 eV 1.5095 eV 3.396 eV\n", + "answer in the book varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planks constant(Js)\n", + "m=9.1*10**-31; #mass(kg)\n", + "a=10; #width(angstrom)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "n1=1; \n", + "n2=2;\n", + "n3=3; #energy states\n", + "\n", + "#Calculations\n", + "lamda1=2*a/n1; #de-Broglie wavelength of first energy state(angstrom)\n", + "lamda2=2*a/n2; #de-Broglie wavelength of second energy state(angstrom)\n", + "lamda3=2*a/n3; #de-Broglie wavelength of third energy state(angstrom)\n", + "E1=n1**2*(h**2)/(8*m*e*(a*10**-10)**2); #energy in 1st excited state(eV)\n", + "E2=n2**2*E1; #energy in 2nd excited state(eV)\n", + "E3=n3**2*E1; #energy in 3rd excited state(eV)\n", + "\n", + "#Result\n", + "print \"de-Broglie wavelength of first three energy states are\",int(lamda1),\"angstrom\",int(lamda2),\"angstrom\",round(lamda3,2),\"angstrom\"\n", + "print \"energies of first three energy states are\",round(E1,2),\"eV\",round(E2,4),\"eV\",round(E3,3),\"eV\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 214" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy in 1st excited state is 14.7 *10**-19 J\n", + "mass is 9.3 *10**-31 kg\n", + "quantum state is 10.4\n", + "as n is not an integer, En is not permitted value of energy\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planks constant(Js)\n", + "a=0.2*10**-9; #width(m)\n", + "e=1.602*10**-19; #charge(coulomb)\n", + "n5=5; #energy state\n", + "E5=230*e; #energy 0f 5th state(J)\n", + "En=10**3*e; #energy(eV)\n", + "\n", + "#Calculations\n", + "E1=E5/n5**2; #energy in 1st excited state(eV)\n", + "m=h**2/(8*E1*a**2); #mass(kg)\n", + "n=math.sqrt(En/E1); #quantum state\n", + "\n", + "#Result\n", + "print \"energy in 1st excited state is\",round(E1*10**19,1),\"*10**-19 J\"\n", + "print \"mass is\",round(m*10**31,1),\"*10**-31 kg\"\n", + "print \"quantum state is\",round(n,1)\n", + "print \"as n is not an integer, En is not permitted value of energy\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 225" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reflection coefficient in 1st case is 0.05\n", + "answer given in the book is wrong\n", + "transmission coefficient in 1st case is 0.95\n", + "for E=0.025, E<V. so transmission coefficient is 0 and reflection coefficient is 1\n", + "reflection coefficient in 3rd case is 1\n", + "transmission coefficient in 3rd case is 0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "E1=0.04*e; #energy(J)\n", + "V=0.03*e; #energy barrier(J) \n", + "E2=0.025*e; #energy(J)\n", + "E3=0.03*e; #energy(J)\n", + "m=1; #assume \n", + "k1=1; #assume\n", + "\n", + "#Calculations\n", + "x=math.sqrt(E1-V);\n", + "y=math.sqrt(E1+V);\n", + "R1=((math.sqrt(E1)-x)/(math.sqrt(E1)+y))**2; #reflection coefficient\n", + "T1=1-R; #transmission coefficient\n", + "k2=math.sqrt(2*m*(E3-V)); \n", + "R2=((k1-k2)/(k1+k2))**2; #reflection coefficient\n", + "T2=4*k1*k2/(k1+k2)**2; #transmission coefficient \n", + "\n", + "#Result\n", + "print \"reflection coefficient in 1st case is\",round(R1,2)\n", + "print \"answer given in the book is wrong\"\n", + "print \"transmission coefficient in 1st case is\",round(T1,2)\n", + "print \"for E=0.025, E<V. so transmission coefficient is 0 and reflection coefficient is 1\"\n", + "print \"reflection coefficient in 3rd case is\",int(R2)\n", + "print \"transmission coefficient in 3rd case is\",int(T2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 226" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "value of E/V is 1.03\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T=0.5; #transmission coefficient \n", + "a=1;\n", + "b=6;\n", + "c=1;\n", + "\n", + "#Calculations\n", + "k1byk2=(b+math.sqrt((b**2)-(4*a*c)))/(2*a); \n", + "x=k1byk2**2;\n", + "EbyV=x/(x-1); #value of E/V\n", + "\n", + "#Result\n", + "print \"value of E/V is\",round(EbyV,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 226" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transmission probabilities in 1st case are 4.5 *10**-5 and 1.4 *10**-4\n", + "transmission probabilities in 2nd case are 2.1 *10**-9 and 1.25 *10**-9\n", + "answer for transmission probability in 2nd case given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "m=9.1*10**-31; #mass(kg)\n", + "a1=5*10**-10; #width(m)\n", + "a2=10*10**-10; #width(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "V0=5; #energy barrier(eV)\n", + "E1=1; #energy of electron(eV)\n", + "E2=2;\n", + "chi=1.054*10**-34; #plancks constant(Js)\n", + "\n", + "#Calculations\n", + "beta1=math.sqrt(2*m*(V0-E1)*e/chi**2); #value of beta(m-1)\n", + "x1=int(-2*a1*beta1);\n", + "beta2=math.sqrt(2*m*(V0-E2)*e/chi**2); #value of beta(m-1)\n", + "x2=round(-2*a1*beta2,1);\n", + "T1=math.exp(x1); #transmission probability in 1st case\n", + "T2=math.exp(x2); #transmission probability in 1st case\n", + "x3=int(-2*a2*beta1);\n", + "x4=round(-2*a2*beta1,1);\n", + "T1dash=math.exp(x3); #transmission probability in 2nd case\n", + "T2dash=math.exp(x4); #transmission probability in 1st case\n", + "\n", + "#Result\n", + "print \"transmission probabilities in 1st case are\",round(T1*10**5,1),\"*10**-5 and\",round(T2*10**4,1),\"*10**-4\"\n", + "print \"transmission probabilities in 2nd case are\",round(T1dash*10**9,1),\"*10**-9 and\",round(T2dash*10**9,2),\"*10**-9\"\n", + "print \"answer for transmission probability in 2nd case given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 227" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "transmission coefficient is 4 math.exp ( -1.625 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "m=9.1*10**-31; #mass(kg)\n", + "a=10**-10; #width(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "V0=5; #energy barrier(eV)\n", + "E=2.5; #energy of electron(eV)\n", + "chi=1.05*10**-34; #plancks constant(Js)\n", + "\n", + "#Calculations\n", + "x=16*E*(V0-E)/V0**2;\n", + "y=-2*a*math.sqrt(2*m*(V0-E)*e/chi**2);\n", + "#T=x*math.exp(y); #transmission coefficient\n", + "\n", + "#Result\n", + "print \"transmission coefficient is\",int(x),\"math.exp (\",round(y,3),\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 227" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average lifetime of nucleus is 3.7 *10**17 years\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "P=10**21; #probability(T per sec)\n", + "m=4*1.6*10**-27; #mass(kg)\n", + "a=2*10**-14; #width(m)\n", + "e=1.67*10**-19; #charge(coulomb)\n", + "V0=30; #energy barrier(eV)\n", + "E=4.2; #energy of electron(eV)\n", + "chi=1.05*10**-34; #plancks constant(Js)\n", + "\n", + "#Calculations\n", + "x=P*16*E*(V0-E)/V0**2;\n", + "y=-2*a*math.sqrt(2*m*(V0-E)*10**6*e/chi**2);\n", + "T=x*math.exp(y); #transmission coefficient\n", + "tow=1/T; #average lifetime of nucleus(years) \n", + "\n", + "#Result\n", + "print \"average lifetime of nucleus is\",round(tow/10**17,1),\"*10**17 years\"\n", + "print \"answer given in the book is wrong\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter7.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter7.ipynb new file mode 100644 index 00000000..fad1281c --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter7.ipynb @@ -0,0 +1,489 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 7: Nuclear Structure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 235" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total mass is 11.7167 *10**-27 kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "mp=1.6725*10**-27; #mass of proton(kg)\n", + "mn=1.6748*10**-27; #mass of neutron(kg)\n", + "\n", + "#Calculations\n", + "m=(3*mp)+(4*mn); #total mass(kg)\n", + "\n", + "#Result\n", + "print \"total mass is\",m*10**27,\"*10**-27 kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 235" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of electrons is 36 *10**23\n", + "number of protons is 36 *10**23\n", + "number of neutrons is 48 *10**23\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "N=6*10**23; #avagadro number\n", + "\n", + "#Calculations\n", + "e=6*N; #number of electrons\n", + "p=6*N; #number of protons\n", + "n=8*N; #number of neutrons\n", + "\n", + "#Result\n", + "print \"number of electrons is\",int(e/10**23),\"*10**23\"\n", + "print \"number of protons is\",int(p/10**23),\"*10**23\"\n", + "print \"number of neutrons is\",int(n/10**23),\"*10**23\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 235" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mass number of nucleus is 9\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "r=2.71*10**-15; #radius(m)\n", + "r0=1.3*10**-15; \n", + "\n", + "#Calculations\n", + "A=(r/r0)**3; #mass number of nucleus\n", + "\n", + "#Result\n", + "print \"mass number of nucleus is\",int(A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 4, Page number 235" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of He is 2.2375 fermi\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "r1=7.731; #radius(fermi)\n", + "A1=165; #mass number of Ho\n", + "A2=4; #mass number of He \n", + "\n", + "#Calculations\n", + "r2=r1*(A2/A1)**(1/3); #radius of He(fermi)\n", + "\n", + "#Result\n", + "print \"radius of He is\",round(r2,4),\"fermi\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 5, Page number 236" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of nucleus is 4.8 fermi\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "r1=6; #radius(fermi)\n", + "A1=125; #mass number of nucleus\n", + "A2=64; #mass number of nucleus \n", + "\n", + "#Calculations\n", + "r2=r1*(A2/A1)**(1/3); #radius of nucleus(fermi)\n", + "\n", + "#Result\n", + "print \"radius of nucleus is\",r2,\"fermi\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 6, Page number 236" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of nuclear matter is 1.8 *10**17 kg/m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "A=1; #assume\n", + "r=1.3*A**(1/3)*10**-15; #radius(m) \n", + "amu=1.66*10**-27; #amu(kg)\n", + "\n", + "#Calculations\n", + "V=4*math.pi*r**3/3; #volume(m**3)\n", + "M=A*amu;\n", + "rho=M/V; #density of nuclear matter(kg/m**3)\n", + "\n", + "#Result\n", + "print \"density of nuclear matter is\",round(rho/10**17,1),\"*10**17 kg/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 7, Page number 236" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electrostatic potential energy is 3.91 *10**-11 eV\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "A=235/2; #mass number\n", + "r=1.3*A**(1/3)*10**-15; #radius(m) \n", + "Z=46; #atomic number\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "epsilon0=8.65*10**-12; \n", + "\n", + "#Calculations\n", + "U=(Z*e)**2/(4*math.pi*epsilon0*2*r); #electrostatic potential energy(eV)\n", + "\n", + "#Result\n", + "print \"electrostatic potential energy is\",round(U*10**11,2),\"*10**-11 eV\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 8, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "binding energy of alpha particle is 28.5229 MeV\n", + "binding energy per nucleon is 7.1307 MeV\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "mp=1.007277; #mass of proton(amu)\n", + "mhn=4.001265; #mass of helium nucleus(amu)\n", + "mn=1.008666; #mass of neutron(amu)\n", + "amu=931.4812; #amu(MeV)\n", + "\n", + "#Calculations\n", + "m=(2*mp)+(2*mn); #total initial mass(amu)\n", + "deltam=m-mhn; #mass defect(amu)\n", + "BEalpha=deltam*amu; #binding energy of alpha particle(MeV)\n", + "BEn=BEalpha/4; #binding energy per nucleon(MeV)\n", + "\n", + "#Result\n", + "print \"binding energy of alpha particle is\",round(BEalpha,4),\"MeV\"\n", + "print \"binding energy per nucleon is\",round(BEn,4),\"MeV\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 9, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy released is 63.0 *10**10 J\n", + "electrical energy is 8.75 *10**3 kilowatt hour\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "mh=1*10**-3; #mass of hydrogen(kg)\n", + "mhe=0.993*10**-3; #mass of helium(kg)\n", + "e=5/100; #efficiency\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "x=36*10**5; \n", + "\n", + "#Calculations\n", + "deltam=mh-mhe; #mass defect(kg)\n", + "E=deltam*c**2; #energy released(J)\n", + "EE=e*E/x; #electrical energy(kilowatt hour)\n", + "\n", + "#Result\n", + "print \"energy released is\",E/10**10,\"*10**10 J\"\n", + "print \"electrical energy is\",round(EE/10**3,2),\"*10**3 kilowatt hour\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 10, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy released is 0.73 MeV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "mp=1.6725*10**-27; #mass of proton(kg)\n", + "me=9*10**-31; #mass of electron(kg)\n", + "mn=1.6747*10**-27; #mass of neutron(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculations\n", + "deltam=mn-(mp+me); #mass defect(kg)\n", + "E=deltam*c**2/(e*10**6); #energy released(MeV)\n", + "\n", + "#Result\n", + "print \"energy released is\",round(E,2),\"MeV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 11, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "atomic mass is 34.96908 amu\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "mp=1.007825; #mass of proton(amu)\n", + "mn=1.008665; #mass of neutron(amu)\n", + "BE=298; #binding energy(MeV)\n", + "amu=931.5; #amu(MeV)\n", + "\n", + "#Calculations\n", + "m=(17*mp)+(18*mn); #total initial mass(amu)\n", + "deltam=BE/amu; #mass defect(amu)\n", + "Am=m-deltam; #atomic mass(amu)\n", + "\n", + "#Result\n", + "print \"atomic mass is\",round(Am,5),\"amu\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter9.ipynb b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter9.ipynb new file mode 100644 index 00000000..c759246f --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/Chapter9.ipynb @@ -0,0 +1,173 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 9: Nuclear Reactions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 1, Page number 272" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of nuclei produced per second is 1.66 *10**5\n", + "answer given in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "rho=19.3*10**3; #density(kg/m**3)\n", + "N=6.02*10**23; #avagadro number\n", + "M=197; #molecular weight\n", + "a=2*10**12; #neutrons/m**2 sec\n", + "A=5*10**-4; #area(m**2)\n", + "sigma=94*10**-28; #reaction cross section(m**2)\n", + "t=0.3*10**-3; #thickness(m)\n", + "\n", + "#Calculations\n", + "n=rho*N/M; #number of nuclei per unit volume(per m**3)\n", + "N0=a*A; #number of neutrons hitting the target\n", + "N0_N=N0*(1-math.exp(-n*sigma*t)); #number of nuclei produced per second\n", + "\n", + "#Result\n", + "print \"number of nuclei produced per second is\",round(N0_N/10**5,2),\"*10**5\"\n", + "print \"answer given in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 2, Page number 275" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of neutron is 19.768 MeV\n", + "energy of Be is 5.007 MeV\n", + "angle of recoil of Be atom is 44.855 or 45 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "M1=2.01472; #molecular mass of H(amu)\n", + "M0=7.01784; #molecular mass of Li(amu)\n", + "M2=8.00776; #molecular mass of Be(amu)\n", + "M3=1.00893; #molecular mass of n(amu)\n", + "Ek1=10; #energy(MeV)\n", + "\n", + "#Calculations\n", + "M1M0=M1+M0; #mass of interacting particles(amu)\n", + "M2M3=M2+M3; #mass of product particles(amu)\n", + "Q=(M1M0-M2M3)*931; #decrease in mass(MeV)\n", + "Ek3=(Q+(Ek1*(1-(M1/M2))))/(1+(M3/M2)); #energy of neutron(MeV)\n", + "Ek2=Q+Ek1-Ek3; #energy of Be(MeV)\n", + "phi=math.atan(math.sqrt(Ek3*M3/(Ek1*M1))); #angle of recoil of Be atom(rad)\n", + "phi=phi*180/math.pi; #angle of recoil of Be atom(degrees)\n", + "\n", + "#Result\n", + "print \"energy of neutron is\",round(Ek3,3),\"MeV\" \n", + "print \"energy of Be is\",round(Ek2,3),\"MeV\" \n", + "print \"angle of recoil of Be atom is\",round(phi,3),\"or\",int(round(phi)),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example number 3, Page number 277" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of emitted protons is 5.3 MeV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "Q=-3.9; #Q value of reaction(MeV)\n", + "M1=1.0087; #molecular mass of incident neutron(amu)\n", + "M2=18.99; #molecular mass of O nucleus(amu)\n", + "M3=1.0078; #molecular mass of proton(amu)\n", + "Ek1=10; #energy of incident neutron(MeV)\n", + "\n", + "#Calculations\n", + "x=1-(M1/M2);\n", + "y=1+(M3/M2);\n", + "Ek3=(Q+Ek1*x)/y; #energy of emitted protons(MeV)\n", + "\n", + "#Result\n", + "print \"energy of emitted protons is\",round(Ek3,1),\"MeV\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/1.png b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/1.png Binary files differnew file mode 100644 index 00000000..2023a016 --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/1.png diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/2.png b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/2.png Binary files differnew file mode 100644 index 00000000..d01d6815 --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/2.png diff --git a/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/3.png b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/3.png Binary files differnew file mode 100644 index 00000000..1426a19c --- /dev/null +++ b/Unified_Physics_by_S.L._Gupta,_Sanjeev_Gupta/screenshots/3.png diff --git a/f_by_134/1_An_overview_of_C++.ipynb b/f_by_134/1_An_overview_of_C++.ipynb index ecf52ddd..ecf52ddd 100644..100755 --- a/f_by_134/1_An_overview_of_C++.ipynb +++ b/f_by_134/1_An_overview_of_C++.ipynb diff --git a/f_by_134/1_An_overview_of_C++_1.ipynb b/f_by_134/1_An_overview_of_C++_1.ipynb new file mode 100644 index 00000000..ecf52ddd --- /dev/null +++ b/f_by_134/1_An_overview_of_C++_1.ipynb @@ -0,0 +1,254 @@ +{ + "metadata": { + "name": "1 An overview of C++" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number: 14#\\n#This program outputs a string, two integer values, and a double floating-point value. #\ni=10\nj=20\nd=99.101\nprint ('Here are some values : %d %d %2.3f'%(i,j,d))\n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Here are some values : 10 20 99.101\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 , Page Number: 16#\n\n#Variable declaration\ni=100\n\n#Result\nprint('Enter a value: 100')\nprint 'Here\\'s your number: ',i\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter a value: 100\nHere's your number: 100\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 4 , Page Number 16#\n\n#Variable declaration\ni=10\nf=100.12\ns='Hello World'\n\n#Result\nprint 'Enter an integer,float and string: ',i,f,s\nprint 'Here\\'s your data: ',i,f,s \n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": " Enter an integer,float and string: 10 100.12 Hello World\nHere's your data: 10 100.12 Hello World\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 5 , Page Number 17#\n\n#Variable declaration\nch='X'\n\n#Result\nprint 'Enter keys,X to stop.'\n\n#while loop\nwhile ch!='X':\n if(ch!='X'): \n print ': ',ch\n else:\n break", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter keys,X to stop.\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number 19#\n\n#Variable declaration\na=199\n\nprint 'Enter number to be tested: ',a\n#if loop\nif a % 2 == 0:\n#Result\n print 'Number is even'\nelse:\n print 'Number is odd'\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter number to be tested: 199\nNumber is odd\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 ,Page Number 25#\n\n#class declaration\nclass Myclass():\n def __init__(self,c,d):\n self.a = c\n self.b = d\nobj = Myclass(10,99)\nobj.a,obj.b\n\n#Result\nprint obj.a\nprint obj.b", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "10\n99\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 2 , Page Number 30#\n\n#DefiningFunction\ndef sum(a,b):\n return a+b\na=10\nb=40\n\n#Result\nprint 'Enter two numbers: ',a,b\nprint 'Sum is: ',sum(a,b)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter two numbers: 10 40\nSum is: 50\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 , Page Number 31#\n\n#Variable declaration\ni=5\nprint 'Enter number: ',i\nfact=1\nfor j in range(i):\n fact = fact * (j+1)\n \n#Result\nprint 'Factorial is ',fact\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter number: 5\nFactorial is 120\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 4 ,Page Number 32#\n\noutcome = 'false'\n\n#if loop\nif(outcome):\n print 'true'\nelse:\n print 'false'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "true\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 2 ,Page Number 36#\n\n#Defining function\ndef get_date(day=None, month=None, year=None, as_string=None):\n\tif as_string:\n\t\tprint 'Date:', as_string\n\telse:\n\t\tif not (day and month and year):\n\t\t\traise Exception(\"Invalid Date arguments\")\n\t\tprint \"Date : %d/%d/%d\" % (month, day, year)\n\n\nif __name__ == '__main__':\n\tget_date(as_string=\"3/12/2013\")\n\tget_date(day=12, month=3, year=2013)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Date: 3/12/2013\nDate : 3/12/2013\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 1.3 Q3 , Page Number 18#\n\n#Variable declaration\na=4\nb=8\nd=2\nprint 'Enter two numbers: ',a,b\nif a>b:\n min=b\nelse:\n min=a\nfor d in range(d,min):\n if a % d == 0 and b % d == 0: \n break\nif d == min:\n print 'No common denominators ' \nelse:\n print 'The lowest common denominator is ',d\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter two numbers: 4 8\nThe lowest common denominator is 2\n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number 34#\n\nprint 'Absolute value of -10: ',abs(-10)\nprint 'Absolute value of -10L: ',abs(-10L)\nprint 'Absolute value of -10.01: ',abs(-10.01)\n\n#Defining function\ndef abs(n):\n print 'In integer abs() '\n \n\ndef abs(n):\n print 'In longs abs() '\n\ndef abs(n):\n print 'In double abs() '\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Absolute value of -10: 10\nAbsolute value of -10L: 10\nAbsolute value of -10.01: 10.01\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Excercise 1 , Page Number 18#\n\n#Variable declaration\nhours=3\nwage=2000\n\n#Result\nprint 'Enter hours worked: ',hours\n\nprint 'Enter wage per hour: ',wage\nprint 'Pay is: $',wage*hours", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter hours worked: 3\nEnter wage per hour: 2000\nPay is: $ 6000\n" + } + ], + "prompt_number": 13 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 2 , Page Number 18#\n\n#Variable declaration\nfeet = 5.0\n\n#If loop\nif(feet == 0.0):\n print 'Wrong inpt.'\nelse:\n print 'Enter feet :',feet\n #Result\n print feet*12,'inches'\n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter feet : 5.0\n60.0 inches\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 1.7 Q1 , Page Number 38#\n\nimport math\n\n#Result\nprint 'Square root of 90.34 is : ',math.sqrt(90.34)\nprint 'Square root of 90L is: ',math.sqrt(90L)\nprint 'Square root of 90 is: ',math.sqrt(90)\n\n#Defining functions\ndef sqrt(n):\n print 'computing integer root '\n \n\ndef sqrt(n):\n print 'computing long root '\n\ndef sqrt(n):\n print 'computing double root '", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Square root of 90.34 is : 9.50473566176\nSquare root of 90L is: 9.48683298051\nSquare root of 90 is: 9.48683298051\n" + } + ], + "prompt_number": 15 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Example 3 , Page Number 36#\n\n#Defining functions\ndef f1(a=None,b=None,c=None):\n if a:\n print 'In f1',(a)\n else:\n if not (b and c):\n raise Exception(\"Invalid arguments\")\n print 'In f1',(b,c)\nif __name__ == '__main__':\n\tf1(a=10)\n\tf1(b=10, c=20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "In f1 10\nIn f1 (10, 20)\n" + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/f_by_134/screenshots/anshul.png b/f_by_134/screenshots/anshul.png Binary files differnew file mode 100644 index 00000000..a8cec645 --- /dev/null +++ b/f_by_134/screenshots/anshul.png diff --git a/f_by_134/screenshots/anshul_1.png b/f_by_134/screenshots/anshul_1.png Binary files differnew file mode 100644 index 00000000..a8cec645 --- /dev/null +++ b/f_by_134/screenshots/anshul_1.png diff --git a/f_by_134/screenshots/anshul_2.png b/f_by_134/screenshots/anshul_2.png Binary files differnew file mode 100644 index 00000000..a8cec645 --- /dev/null +++ b/f_by_134/screenshots/anshul_2.png diff --git a/f_by_134/screenshots/chapter14_eg3.png b/f_by_134/screenshots/chapter14_eg3.png Binary files differindex 237faedf..237faedf 100644..100755 --- a/f_by_134/screenshots/chapter14_eg3.png +++ b/f_by_134/screenshots/chapter14_eg3.png diff --git a/f_by_134/screenshots/chapter14_eg6.png b/f_by_134/screenshots/chapter14_eg6.png Binary files differindex b0ea8878..b0ea8878 100644..100755 --- a/f_by_134/screenshots/chapter14_eg6.png +++ b/f_by_134/screenshots/chapter14_eg6.png diff --git a/f_by_134/screenshots/chapter14_eg6_1.png b/f_by_134/screenshots/chapter14_eg6_1.png Binary files differindex b0ea8878..b0ea8878 100644..100755 --- a/f_by_134/screenshots/chapter14_eg6_1.png +++ b/f_by_134/screenshots/chapter14_eg6_1.png diff --git a/f_by_df/ashvani.ipynb b/f_by_df/ashvani.ipynb index 9262bb4f..9262bb4f 100644..100755 --- a/f_by_df/ashvani.ipynb +++ b/f_by_df/ashvani.ipynb diff --git a/f_by_df/chapter03_16.ipynb b/f_by_df/chapter03_16.ipynb index 46ae736b..46ae736b 100644..100755 --- a/f_by_df/chapter03_16.ipynb +++ b/f_by_df/chapter03_16.ipynb diff --git a/f_by_df/chapter03_16_1.ipynb b/f_by_df/chapter03_16_1.ipynb index 46ae736b..46ae736b 100644..100755 --- a/f_by_df/chapter03_16_1.ipynb +++ b/f_by_df/chapter03_16_1.ipynb diff --git a/f_by_df/screenshots/1.png b/f_by_df/screenshots/1.png Binary files differindex 04dc7a94..04dc7a94 100644..100755 --- a/f_by_df/screenshots/1.png +++ b/f_by_df/screenshots/1.png diff --git a/f_by_df/screenshots/2.png b/f_by_df/screenshots/2.png Binary files differindex 3d55a09c..3d55a09c 100644..100755 --- a/f_by_df/screenshots/2.png +++ b/f_by_df/screenshots/2.png diff --git a/f_by_df/screenshots/3.png b/f_by_df/screenshots/3.png Binary files differindex f00ffd91..f00ffd91 100644..100755 --- a/f_by_df/screenshots/3.png +++ b/f_by_df/screenshots/3.png diff --git a/f_by_df/screenshots/chapter14_eg10.png b/f_by_df/screenshots/chapter14_eg10.png Binary files differindex 0a99d2ff..0a99d2ff 100644..100755 --- a/f_by_df/screenshots/chapter14_eg10.png +++ b/f_by_df/screenshots/chapter14_eg10.png diff --git a/f_by_df/screenshots/chapter14_eg3.png b/f_by_df/screenshots/chapter14_eg3.png Binary files differindex 237faedf..237faedf 100644..100755 --- a/f_by_df/screenshots/chapter14_eg3.png +++ b/f_by_df/screenshots/chapter14_eg3.png diff --git a/f_by_df/screenshots/chapter14_eg6.png b/f_by_df/screenshots/chapter14_eg6.png Binary files differindex b0ea8878..b0ea8878 100644..100755 --- a/f_by_df/screenshots/chapter14_eg6.png +++ b/f_by_df/screenshots/chapter14_eg6.png diff --git a/f_by_df/screenshots/image.png b/f_by_df/screenshots/image.png Binary files differindex c1fd6fdb..c1fd6fdb 100644..100755 --- a/f_by_df/screenshots/image.png +++ b/f_by_df/screenshots/image.png diff --git a/f_by_df/screenshots/image_1.png b/f_by_df/screenshots/image_1.png Binary files differindex c1fd6fdb..c1fd6fdb 100644..100755 --- a/f_by_df/screenshots/image_1.png +++ b/f_by_df/screenshots/image_1.png diff --git a/f_by_df/screenshots/image_2.png b/f_by_df/screenshots/image_2.png Binary files differindex c1fd6fdb..c1fd6fdb 100644..100755 --- a/f_by_df/screenshots/image_2.png +++ b/f_by_df/screenshots/image_2.png diff --git a/sample_notebooks/AditiMalik/Chapter6.ipynb b/sample_notebooks/AditiMalik/Chapter6.ipynb index 4810e6f8..4810e6f8 100644..100755 --- a/sample_notebooks/AditiMalik/Chapter6.ipynb +++ b/sample_notebooks/AditiMalik/Chapter6.ipynb diff --git a/sample_notebooks/IshitaGupta/Chapter12.ipynb b/sample_notebooks/IshitaGupta/Chapter12.ipynb index fefc766f..fefc766f 100644..100755 --- a/sample_notebooks/IshitaGupta/Chapter12.ipynb +++ b/sample_notebooks/IshitaGupta/Chapter12.ipynb diff --git a/sample_notebooks/MeenaChandrupatla/Chapter2_Gases_2.ipynb b/sample_notebooks/MeenaChandrupatla/Chapter2_Gases_2.ipynb index 88d5cb73..88d5cb73 100644..100755 --- a/sample_notebooks/MeenaChandrupatla/Chapter2_Gases_2.ipynb +++ b/sample_notebooks/MeenaChandrupatla/Chapter2_Gases_2.ipynb diff --git a/sample_notebooks/RONAKBANSAL/chapter_1.ipynb b/sample_notebooks/RONAKBANSAL/chapter_1.ipynb index c00d0fbc..c00d0fbc 100644..100755 --- a/sample_notebooks/RONAKBANSAL/chapter_1.ipynb +++ b/sample_notebooks/RONAKBANSAL/chapter_1.ipynb diff --git a/sample_notebooks/SufiyanSiddique/Chapter2.ipynb b/sample_notebooks/SufiyanSiddique/Chapter2.ipynb index 7a4bda7a..7a4bda7a 100644..100755 --- a/sample_notebooks/SufiyanSiddique/Chapter2.ipynb +++ b/sample_notebooks/SufiyanSiddique/Chapter2.ipynb diff --git a/sample_notebooks/asmitaasmita/1_An_overview_of_C++.ipynb b/sample_notebooks/asmitaasmita/1_An_overview_of_C++.ipynb index ecf52ddd..ecf52ddd 100644..100755 --- a/sample_notebooks/asmitaasmita/1_An_overview_of_C++.ipynb +++ b/sample_notebooks/asmitaasmita/1_An_overview_of_C++.ipynb diff --git a/sample_notebooks/asmitaasmita/1_An_overview_of_C++_1.ipynb b/sample_notebooks/asmitaasmita/1_An_overview_of_C++_1.ipynb index ecf52ddd..ecf52ddd 100644..100755 --- a/sample_notebooks/asmitaasmita/1_An_overview_of_C++_1.ipynb +++ b/sample_notebooks/asmitaasmita/1_An_overview_of_C++_1.ipynb diff --git a/sample_notebooks/asmitaasmita/1_An_overview_of_C++_2.ipynb b/sample_notebooks/asmitaasmita/1_An_overview_of_C++_2.ipynb new file mode 100644 index 00000000..ecf52ddd --- /dev/null +++ b/sample_notebooks/asmitaasmita/1_An_overview_of_C++_2.ipynb @@ -0,0 +1,254 @@ +{ + "metadata": { + "name": "1 An overview of C++" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number: 14#\\n#This program outputs a string, two integer values, and a double floating-point value. #\ni=10\nj=20\nd=99.101\nprint ('Here are some values : %d %d %2.3f'%(i,j,d))\n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Here are some values : 10 20 99.101\n" + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 , Page Number: 16#\n\n#Variable declaration\ni=100\n\n#Result\nprint('Enter a value: 100')\nprint 'Here\\'s your number: ',i\n\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter a value: 100\nHere's your number: 100\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 4 , Page Number 16#\n\n#Variable declaration\ni=10\nf=100.12\ns='Hello World'\n\n#Result\nprint 'Enter an integer,float and string: ',i,f,s\nprint 'Here\\'s your data: ',i,f,s \n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": " Enter an integer,float and string: 10 100.12 Hello World\nHere's your data: 10 100.12 Hello World\n" + } + ], + "prompt_number": 2 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 5 , Page Number 17#\n\n#Variable declaration\nch='X'\n\n#Result\nprint 'Enter keys,X to stop.'\n\n#while loop\nwhile ch!='X':\n if(ch!='X'): \n print ': ',ch\n else:\n break", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter keys,X to stop.\n" + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number 19#\n\n#Variable declaration\na=199\n\nprint 'Enter number to be tested: ',a\n#if loop\nif a % 2 == 0:\n#Result\n print 'Number is even'\nelse:\n print 'Number is odd'\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter number to be tested: 199\nNumber is odd\n" + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 ,Page Number 25#\n\n#class declaration\nclass Myclass():\n def __init__(self,c,d):\n self.a = c\n self.b = d\nobj = Myclass(10,99)\nobj.a,obj.b\n\n#Result\nprint obj.a\nprint obj.b", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "10\n99\n" + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 2 , Page Number 30#\n\n#DefiningFunction\ndef sum(a,b):\n return a+b\na=10\nb=40\n\n#Result\nprint 'Enter two numbers: ',a,b\nprint 'Sum is: ',sum(a,b)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter two numbers: 10 40\nSum is: 50\n" + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 3 , Page Number 31#\n\n#Variable declaration\ni=5\nprint 'Enter number: ',i\nfact=1\nfor j in range(i):\n fact = fact * (j+1)\n \n#Result\nprint 'Factorial is ',fact\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter number: 5\nFactorial is 120\n" + } + ], + "prompt_number": 8 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 4 ,Page Number 32#\n\noutcome = 'false'\n\n#if loop\nif(outcome):\n print 'true'\nelse:\n print 'false'", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "true\n" + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 2 ,Page Number 36#\n\n#Defining function\ndef get_date(day=None, month=None, year=None, as_string=None):\n\tif as_string:\n\t\tprint 'Date:', as_string\n\telse:\n\t\tif not (day and month and year):\n\t\t\traise Exception(\"Invalid Date arguments\")\n\t\tprint \"Date : %d/%d/%d\" % (month, day, year)\n\n\nif __name__ == '__main__':\n\tget_date(as_string=\"3/12/2013\")\n\tget_date(day=12, month=3, year=2013)\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Date: 3/12/2013\nDate : 3/12/2013\n" + } + ], + "prompt_number": 10 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 1.3 Q3 , Page Number 18#\n\n#Variable declaration\na=4\nb=8\nd=2\nprint 'Enter two numbers: ',a,b\nif a>b:\n min=b\nelse:\n min=a\nfor d in range(d,min):\n if a % d == 0 and b % d == 0: \n break\nif d == min:\n print 'No common denominators ' \nelse:\n print 'The lowest common denominator is ',d\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter two numbers: 4 8\nThe lowest common denominator is 2\n" + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Ex 1 , Page Number 34#\n\nprint 'Absolute value of -10: ',abs(-10)\nprint 'Absolute value of -10L: ',abs(-10L)\nprint 'Absolute value of -10.01: ',abs(-10.01)\n\n#Defining function\ndef abs(n):\n print 'In integer abs() '\n \n\ndef abs(n):\n print 'In longs abs() '\n\ndef abs(n):\n print 'In double abs() '\n", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Absolute value of -10: 10\nAbsolute value of -10L: 10\nAbsolute value of -10.01: 10.01\n" + } + ], + "prompt_number": 12 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Excercise 1 , Page Number 18#\n\n#Variable declaration\nhours=3\nwage=2000\n\n#Result\nprint 'Enter hours worked: ',hours\n\nprint 'Enter wage per hour: ',wage\nprint 'Pay is: $',wage*hours", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter hours worked: 3\nEnter wage per hour: 2000\nPay is: $ 6000\n" + } + ], + "prompt_number": 13 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 2 , Page Number 18#\n\n#Variable declaration\nfeet = 5.0\n\n#If loop\nif(feet == 0.0):\n print 'Wrong inpt.'\nelse:\n print 'Enter feet :',feet\n #Result\n print feet*12,'inches'\n ", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Enter feet : 5.0\n60.0 inches\n" + } + ], + "prompt_number": 14 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Exercise 1.7 Q1 , Page Number 38#\n\nimport math\n\n#Result\nprint 'Square root of 90.34 is : ',math.sqrt(90.34)\nprint 'Square root of 90L is: ',math.sqrt(90L)\nprint 'Square root of 90 is: ',math.sqrt(90)\n\n#Defining functions\ndef sqrt(n):\n print 'computing integer root '\n \n\ndef sqrt(n):\n print 'computing long root '\n\ndef sqrt(n):\n print 'computing double root '", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "Square root of 90.34 is : 9.50473566176\nSquare root of 90L is: 9.48683298051\nSquare root of 90 is: 9.48683298051\n" + } + ], + "prompt_number": 15 + }, + { + "cell_type": "code", + "collapsed": false, + "input": "#Example 3 , Page Number 36#\n\n#Defining functions\ndef f1(a=None,b=None,c=None):\n if a:\n print 'In f1',(a)\n else:\n if not (b and c):\n raise Exception(\"Invalid arguments\")\n print 'In f1',(b,c)\nif __name__ == '__main__':\n\tf1(a=10)\n\tf1(b=10, c=20)", + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": "In f1 10\nIn f1 (10, 20)\n" + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/sample_notebooks/chayas/DimensionsSystemUnits.ipynb b/sample_notebooks/chayas/DimensionsSystemUnits.ipynb index cdb3b1c1..cdb3b1c1 100644..100755 --- a/sample_notebooks/chayas/DimensionsSystemUnits.ipynb +++ b/sample_notebooks/chayas/DimensionsSystemUnits.ipynb |