In [1]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
V1=343; #velocity of air(m/s)
V2=1372; #velocity f water(m/s)
dt=3; #time difference(s)
#Calculation
S=((V1*V2)*(dt))/(V2-V1); #distance between two ships(m)
#Result
print "distance between two ships is",S,"m"
```

In [3]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
V=1700; #velocity of sound(m/s)
t=0.65; #time(s)
n=0.07*10**6; #frequency of source(Hz)
#Calculation
d=(V*t)/2; #depth of sea(m)
lamda=V/n; #wavelength of pulse(m)
#Result
print "depth of sea is",d,"m"
print "wavelength of pulse is",round(lamda,4),"m"
```

In [8]:

```
#importing modules
import math
from __future__ import division
#Variable declaration
P=1;
l=40*10**-3; #length of pure rod(m)
E=115*10**9; #Young's modulus(N/m**2)
D=7.25*10**3; #density of pure iron(kg/m**3)
#Calculation
n=(P/(2*l))*math.sqrt(E/D); #natural frequency of pure rod(Hz)
#Result
print "natural frequency of pure rod is",round(n/10**3,1),"kHz"
print "answer given in the book is wrong"
print "frequency of rod is more than audible range, rod can be used in magnetostriction oscillator"
```