In [3]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
l0 = 50 #length of rocket ship(m)
l = 49.5 #length observed on ground(m)
c = 3*10**8 #velocity of light(m/sec)
#Calculation
#we know that l = l0*math.sqrt(1-((v**2)/(c**2)))
v = math.sqrt((c**2)*(1-((l/l0)**2))) #speed(m/sec)
v = v*10**-7;
v=math.ceil(v*10**3)/10**3; #rounding off to 3 decimals
#Result
print "speed of the rocket is",v, "*10**7 m/sec"
```

In [11]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
l0 = 1; #assume length(m)
l = (99/100)*l0 #length observed on ground(m)
c = 1 #assume c = 1
#Calculation
#we know that l = l0*math.sqrt(1-((v**2)/(c**2)))
v = math.sqrt((c**2)*(1-((l/l0)**2))) #speed(m/sec)
v=math.ceil(v*10**4)/10**4; #rounding off to 4 decimals
#Result
print "speed of the rocket is",v,"c"
print "answer given in the book is wrong"
```

In [14]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
l0 = 120 #length of spaceship(m)
c = 1 #assume c = 1
v = 0.99*c; #speed of spaceship(m/sec)
#Calculation
l = l0*math.sqrt(1-((v**2)/(c**2))); #length of the observer(m)
#Result
print "length of the observer is",round(l),"m"
```

In [18]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
#surface area of elliptical lamina = 1/2 (area of circular lamina)
#Calculation
c = 3*10**8; #velocity of light(m/sec)
#((math.pi*D**2)/4)*math.sqrt(1-(v**2/c**2)) = 1/2*math.pi*D**2/4
#math.sqrt(1-(v**2/c**2)) = 1/2
v = c*math.sqrt(1-(1/4)); #velocity(m/sec)
v = v*10**-8;
v=math.ceil(v*10)/10; #rounding off to 1 decimal
#Result
print "velocity is",v,"*10**8 m/sec"
```

In [22]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
t0 = 2*10**-8; #mean life of meson(sec)
c = 1; #assume c = 1
v = 0.8*c; #velocity of meson(m/sec)
#Calculation
t = t0/math.sqrt(1-(v**2/c**2)); #mean life with a particular velocity
#Result
print "mean life of meson with a velocity is",round(t/1e-8,3),"*10**-8 sec"
```

In [3]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
t0 = 3; #time period of pendulum(sec)
c = 1; #assume c = 1
v = 0.95*c; #velocity of observer(m/sec)
#Calculation
t = t0/math.sqrt(1-(v**2/c**2)); #time period measured by observer(sec)
t = math.ceil(t*100)/100; #rounding off to 2 decimals
#Result
print "time period measured by observer is",t,"sec"
```

In [9]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
t0 = 1; #life time of particle(micro sec)
v = 2.7*10**8; #velocity of particle(m/sec)
c = 3*10**8; #velocity of light(m/sec)
#Calculation
t0 = t0*10**-6; #life time of particle(sec)
t = t0/math.sqrt(1-(v**2/c**2)); #life time(sec)
t = round(t/1e-6,1)*10**-6;
x = v*t; #distance travelled before disintegration(m)
#Result
print "life time is",t,"sec"
print "distance travelled before disintegration is",x,"m"
print "answer for distance given in the book is wrong"
```

In [3]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
c = 1; #assume c = 1
u = -0.85*c; #speed of B
v = 0.75*c; #speed of A
#Calculation
u_dash = (u-v)/(1-(u*v/c**2)); #velocity of B with respect to A
u_dash = math.ceil(u_dash*10**3)/10**3; #rounding off to 3 decimals
#Result
print "velocity of B with respect to A is",u_dash,"c"
print "answer given in the book is wrong with respect to sign"
```

In [6]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
c = 1; #assume c = 1
u_dash = 0.9*c; #velocity of beta particle
v = 0.25*c; #speed of A
#Calculation
u = (u_dash+v)/(1+(u_dash*v/c**2)); #speed of beta particle
u = math.ceil(u*10**2)/10**2; #rounding off to 2 decimals
#Result
print "speed of beta particle is",u,"c"
```

In [18]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
mp = 1.6*10**-27; #mass of proton(kg)
me = 9.1*10**-31; #mass of electron(kg)
c = 3*10**8; #velocity of light(m/sec)
#Calculation
m0 = me;
m = mp;
# we know that m = m0/math.sqrt(1-(v**2/c**2));
A = (m0/m)**2;
v_square = (1-A)*(c**2);
v = math.sqrt(v_square); #speed of electron(m/sec)
v = v*10**-8;
v = math.ceil(v*10**7)/10**7; #rounding off to 7 decimals
#Result
print "speed of electron is",v,"*10**8 m/sec"
```

In [22]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
m0 = 1; #assume m0 = 1
m = 2.25*m0;
#Calculation
A = (m0/m)**2;
v_square = (1-A)*(c**2);
v = math.sqrt(v_square); #speed of a body(m/sec)
v = v*10**-8;
v = math.ceil(v*10**3)/10**3; #rounding off to 3 decimals
#Result
print "speed of the body is",v,"*10**8 m/sec"
```

In [27]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
c = 1; #assume c = 1
v = 0.99*c; #velocity of electron
m0 = 9.1*10**-31; #mass(kg)
#Calculation
m = m0/math.sqrt(1-(v**2/c**2)); #mass of electron(kg)
m = m*10**31;
#Result
print "mass of the electron is",int(m),"*10**-31 kg"
```

In [28]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
```

In [29]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
```

In [30]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
```

In [ ]:

```
```