summaryrefslogtreecommitdiff
path: root/1970/CH1/EX1.2/Ch01Exa2.sce
blob: e57b816407346951214774d82d48b95adfaab72d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Scilab code Exa1.2 :  : Page 51 (2011)
clc; clear;
A = 14;        // Number of protons
Z = 7;        // Number of neutrons
N = A-Z;        // Number of electrons 
i = modulo((N+A),2);   // Remainder
// Check for even and odd number of particles !!!!! 
if  i == 0 then        // For even number of particles
    printf("\nParticles have integral spin");
    s = 1;    // Nuclear spin
end
 if i == 1 then        // For odd number of particles
    printf(" \nParticles have half integral spin ");
    s = 1/2;
end
if s == 1 then
    printf( "\nMeasured value agree with the assumption");
end
if s == 1/2 then
    printf( "\nMeasured value disagree with the assumption" );
end

// Result
// Particles have half integral spin 
// Measured value disagree with the assumption