summaryrefslogtreecommitdiff
path: root/3845/CH30/EX30.5
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3845/CH30/EX30.5
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3845/CH30/EX30.5')
-rw-r--r--3845/CH30/EX30.5/Ex30_5.sce36
1 files changed, 36 insertions, 0 deletions
diff --git a/3845/CH30/EX30.5/Ex30_5.sce b/3845/CH30/EX30.5/Ex30_5.sce
new file mode 100644
index 000000000..0e70bef0f
--- /dev/null
+++ b/3845/CH30/EX30.5/Ex30_5.sce
@@ -0,0 +1,36 @@
+//Example 30.5
+n=3;//Shell
+number_subshell=0;//To store value of number of subshells
+for i=0:1:n-1
+ number_subshell=number_subshell+1;
+end
+printf('Number of subshells in the nth shell = %d\n\n',number_subshell)
+Max=0;//To store value of Maximum number of electrons in a shell
+for l=0:1:2
+ electrons_in_subshell=2*(2*l+1)
+ if l==0
+ s='s';
+ elseif l==1
+ s='p';
+ elseif l==2
+ s='d';
+ elseif l==3
+ s='f';
+ elseif l==4
+ s='g';
+ elseif l==5
+ s='h';
+ elseif l==6
+ s='i';
+ end
+ printf('%d%s subshell can have a maximum of %d electrons\n',n,s,electrons_in_subshell)
+ Max=Max+electrons_in_subshell;
+end
+printf('Maximum number of electrons that can be in the shell = %d',Max)
+if Max==(2*n^2)
+ printf('\n\nThis is the same as calculated by the formula: \nMaximum number of electrons that can be in the nth shell = (2*n^2)')
+end
+//The code is programmed for upto l=6. Beyond this, the subshell notation may be carried on in alphabetical order
+//Openstax - College Physics
+//Download for free at http://cnx.org/content/col11406/latest
+