In [6]:

```
#Variable declaration
n=512 #frequency in Hz
l=67 #wavelength in cm
#Calculation
v=n*l #calculating velocity
#Result
print"Velocity = ",v," cm/sec"
print"NOTE:Calculation mistake in book"
```

In [1]:

```
#Variable declaration
v=340 #velocity in m/sec
l=0.68 #wavelength in m
#Calculation
n=v/l #calculating frequency
#Result
print"Frequency",n,"Hz"
```

In [3]:

```
#Variable declaration
v=3*10**8 #velocity in m/sec
n=500*10**3 #frequency in Hz
#Calculation
l=v/n #calculating wavelength
#Result
print"Wavelength=",l,"m"
```

In [7]:

```
#Variable declaration
v=330 #velocity in m/sec
n=560.0 #frequency in Hz
#Calculation
lamda=v/n #calculating wavelength
#Result
print"lambda=",round(lamda,3),"m"
print"Distance travelled in 30 vibrations in m = ",round(lamda*30,2),"m"
```

In [4]:

```
import math
#Variable declaration
s=90.0 #distance in m
u=0 #initial velocity in m/sec
#Calculation
t=math.sqrt(90/4.9) #calculating time using kinematical equation
later=4.56 #Time after which sound is heard
t1=later-t #calculating time taken by sound to travel
t1=round(t1,2)
v=s/t1 #calculating velocity
#Result
print"Velocity in m/sec = ",round(v,2),"m/s"
```

In [16]:

```
#Variable declaration
l1=1.5 #wavelength in m
l2=2 #wavelength in m
v1=120 #velocity in m/sec
#Calculation
n=v1/l1 #calculating frequency
v2=n*l2 #calculating velocity
#Result
print"Velocity in m/sec = ",v2,"m/sec"
```

In [4]:

```
#Variable declaration
l=5641*10**-10 #wavelength in m
c=3*10**8 #velocity in m/sec
u=1.58 #refractive index of glass
#Calculation
n=c/l #calculating frequency
cg=c/u #calculating velocity of light in glass
l1=cg/n #calculating wavelegth in glass
#Result
print"Wavelength in glass in Angstrom =",l1*10**10,"Angstrom"
print"\n\nNOTE:Calculation ambiguity in book,value of cg is taken as 1.9*10**8 ,Therefore final answer is changed"
```

In [18]:

```
#Variable declaration
n=12*10**6 #frequency in Hz
v=3*10**8 #velocity in m/sec
#Calculation
l=v/n #calculating wavelength
#Result
print"Wavelength in m = ",l,"m"
```

In [1]:

```
#Variable declaration
n=400 #frequency in Hz
v=300.0 #velocity in m/sec
#Calculation
l=v/n #calculating wavelength
#Result
print"Wavelength=",l,"m"
```

In [7]:

```
import math
#Variable declaration
a=20 #amplitude in cm
n=6 #frequency per second
#Calculation
w=2*(math.pi)*n #omega in radians/sec
#Result
print"Omega in radians/sec = ",round(w,1),"rad/sec"
print"y=",a,"sin",round(w,1),"t"
```

In [8]:

```
#Variable declaration
a=6 #amplitude in cm
n=9 #frequency in Hz.
#Calculation
vmax=2*(math.pi)*n*6 #calculating velocity in cm/sec
acc=-((18*(math.pi))**2)*6 #calculating acc. in m/sec square
#Result
print"Maximum velocity in cm/sec = ",round(vmax,2),"cm/sec"
print"Velocity at extreme position = 0"
print"Accelaration at mean position = 0"
print"Accelaration at extreme position = ",round(acc,1),"m/sec^2"
print"\n\nNOTE:Calculation mistake in book"
```

In [12]:

```
#Variable declaration
g=9.8 #gravitational constant
m=50 #mass in kg
l=0.2 #length in m
T=0.6 #time period
#Calculation
k=(m*g)/l #calculating constant
m=2450*((T/(2*(math.pi)))**2) #calcualting mass using given time period
#Result
print"Mass of body= ",round(m,2),"kg"
print"Weight of suspended body=",round(m,2)*g,"N"
```