summaryrefslogtreecommitdiff
path: root/623/CH1/EX1.1.29/U1_C1_29.sce
blob: 98bc691e4310684973ad0b32abd3bf68ec87b164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//variable initialization
h=6.63*10^-34                                     //planck's constant (joule*second)
c=3*10^8                                          //speed of light (meter/second)
lambda1=5000*10^-10                               //wavelength (meter)
lambda2=0.1*10^-10                                //wavelength (meter)

//Calculation of effective mass of photon:

//part(i): wavelength=5000 Å
m1=h/(lambda1*c);                                 //effective mass of photon of wavelength 5000 Å

//part(ii): wavelength=0.1 Å
m2=h/(lambda2*c);                                 //effective mass of photon of wavelength 0.1 Å

printf("\neffective mass of photon:\n\t(i) mass = %.2e kg\n\t(ii) mass = %.2e kg",m1,m2);