Chapter 2 :Motion in a straight line

Example 2.1 , Page no:11

In [1]:
import math
from __future__ import division

#initialisation of variables
s=9 #miles
#since 45 min=3/4hr
t=3/4 #hr

#CALCULATIONS
v=(s/t)

#RESULTS
print "Velocity in min/hr =",round(v);
Velocity in min/hr = 12.0

Example 2.2 , Page no:11

In [2]:
import math
from __future__ import division

#initialisation of variables
s=(1100*3)

#RESULTS
print"Distance in ft =",round(s);
Distance in ft = 3300.0

Example 2.3 , Page no:11

In [3]:
import math
from __future__ import division

#initialisation of variables
s=1.5*10**11; #m
v=3*10**8; #ms

#CALCULATIONS
t=(s/v)

#Result
print"Time in second =",round(t),"sec";
Time in second = 500.0 sec

Example 2.4 , Page no:11

In [4]:
import math
from __future__ import division

#initialisation of variables
s=270; #mils
t=4.5; #hours
t2=7; #hours
s2=300; #mi

#CALCULATIONS
v=(s/t)
vt=(v*t2)
t3=(s2/v)

#RESULTS
print"Velocity in min/hr =",round(v),"mi/hr";
print"Distance in mile =",round(vt),"mils";
print"Time in hr =",round(t3),"hours";
Velocity in min/hr = 60.0 mi/hr
Distance in mile = 420.0 mils
Time in hr = 5.0 hours

Example 2.5 , Page no:11

In [5]:
import math
from __future__ import division

#initialisation of variables
s=1000; #distance in mile

#CALCULATIONS
v=400+120; #velocity in mile/hr
t=s/v;

#RESULTS
print"Time in hr =",round(t,1); 
Time in hr = 1.9

Example 2.6 , Page no:11

In [6]:
import math
from __future__ import division

#initialisation of variables
v1=100; #speed in km/hr
v2=60; #speed in km/hr
v3=80; #speed in km/hr
t1=2; #time in hr
t2=2; #time in hr
t3=1; #time in hr

#CALCULATIONS
v=((v1*t1)+(v2*t2)+(v3*t3))/(t1+t2+t3)

#RESULTS
print"Velocity in km/hr =",round(v);
Velocity in km/hr = 80.0

Example 2.7 , Page no:12

In [7]:
import math
from __future__ import division

#initialisation of variables
v=40; #velocity in ft/sec
t=10; #time in sec

#CALCULATIONS
a=v/t;
v1=a*t

#RESULTS
print"Accelaration in ft/sec square =",round(a);
print"Velocity in ft/sec =",round(v1);
Accelaration in ft/sec square = 4.0
Velocity in ft/sec = 40.0

Example 2.8 , Page no:12

In [8]:
import math
from __future__ import division

#initialisation of variables
v=30; #velocity in min/hr
v0=20; #velocity in min/hr
t=1.5; #time in sec

#CALCULATIONS
a=((v-v0)/t);  #calculating acc. 
t1=(36-30)/a; #calculating time

#RESULTS
print"Accelaration in (min/h)/sec =",round(a,3);
print"Time in second =",round(t1,2);
Accelaration in (min/h)/sec = 6.667
Time in second = 0.9

Example 2.9 , Page no:12

In [9]:
import math
from __future__ import division

#initialisation of variables
v=24; #velocity in m/sec
a=8; #acc. in m/sec square

#CALCULATIONS
t=v/a; #using t=v/a
s=(1/2)*(a*t*t); #kinematical equation

#RESULTS
print"Time in sec =",round(t);
print"Distance in metre =",round(s);
Time in sec = 3.0
Distance in metre = 36.0

Example 2.10 , Page no:12

In [10]:
import math
from __future__ import division

#initialisation of variables
v=30; #velocity in m/sec
a=6; #acc. in m/sec square

#CALCULATIONS
t=v/a; #using t=v/a
s=(1/2)*(a*t*t); #kinematical equation

#RESULTS
print"Time in sec =",round(t);
print"Distance in metre =",round(s);
Time in sec = 5.0
Distance in metre = 75.0

Example 2.11 , Page no:12

In [11]:
import math
from __future__ import division

#initialisation of variables
v=math.sqrt(2*5*600);

#RESULTS
print"Velocity in ft/sec =",round(v);
Velocity in ft/sec = 77.0

Example 2.12 , Page no:12

In [12]:
import math
from __future__ import division

#initialisation of variables
v=50; #velocity in m/sec
s=500; #distance in m

#CALCULATIONS
a=((v*v)/(2*s));

#RESULTS
print"Acc. in m/sec square =",round(a,2)
Acc. in m/sec square = 2.5

Example 2.13 , Page no:13

In [13]:
import math
from __future__ import division

#initialisation of variables
v=15; #velocity in m/sec
v0=30; #velocity in m/sec
a=-2; #acc. in m/sec square

#CALCULATIONS
s=((v*v)-(v0*v0))/(2*a); #kinematical equation
v=0;
s1=(v*v)-(v0*v0)/(2*a);

#RESULTS
print"Distance in metre =",round(s,2);
print"Distance in metre =",round(s1,2);
Distance in metre = 168.75
Distance in metre = 225.0

Example 2.14 , Page no:13

In [14]:
import math
from __future__ import division

#initialisation of variables
g=9.8; #gravitational constant in m/sec square
t=2.5; #time in sec

#CALCULATIONS
v=g*t;
h=(1/2)*g*t*t; #kinematical equation

#RESULTS
print"Velocity in m/sec =",round(v,2);
print"Height in m =",round(h,3);
Velocity in m/sec = 24.5
Height in m = 30.625

Example 2.15 , Page no:13

In [15]:
import math
from __future__ import division

#initialisation of variables
g=32; #gravitational constant in ft/sec square
h=64; #height in ft

#CALCULATIONS
t=(math.sqrt((2*h)/g)); #kinematical equation
v=g*t; #kinematical equation

#RESULTS
print"Time in sec =",round(t);
print"Velocity in ft/sec =",round(v);
Time in sec = 2.0
Velocity in ft/sec = 64.0

Example 2.16 , Page no:13

In [16]:
import math
from __future__ import division

#initialisation of variables
g=32; #gravitational constant in ft/sec square
h=100; #height in ft

#CALCULATIONS
v=math.sqrt(2*g*h); #calculating velocity 

#RESULTS
print"Velocity in ft/sec =",round(v);
Velocity in ft/sec = 80.0

Example 2.17 , Page no:13

In [17]:
import math
from __future__ import division

#initialisation of variables
h=0.78; #height in m
g=9.8; #gravitational constant in m/sec square
v=0.5; #velocity in m/sec

#CALCULATIONS
t=math.sqrt((2*h)/g); #calculating t
s=v*t; #calculating distance

#RESULTS
print"Time required in sec =",round(t,3);
print"Horizontal distance in m =",round(s,3);
Time required in sec = 0.399
Horizontal distance in m = 0.199

Example 2.18 , Page no:14

In [18]:
import math
from __future__ import division

#initialisation of variables
v0=20; #velocity in ft/sec
g=32; #gravitational constant in ft/sec
t=2; #time in sec

#CALCULATIONS
v=v0+(g*t); #kinematical equation
s=(v0*t)+(1/2)*g*t*t;  #kinematical equation

#RESULTS
print"Velocity in ft/sec =",round(v);
print"Distance in ft =",round(s);
Velocity in ft/sec = 84.0
Distance in ft = 104.0

Example 2.19 , Page no:14

In [19]:
import math
from __future__ import division

#initialisation of variables
v0=20; #velocity in ft/sec
g=-32; #gravitational constant in ft/sec
t=0.5; #time in sec

#CALCULATIONS
v=v0+(g*t); #kinematical equation
t=2; #time in sec
s=v0+(g*t); #kinematical equation

#RESULTS
print"Velocity in ft/sec =",round(v);
print"Distance in ft =",round(s);
Velocity in ft/sec = 4.0
Distance in ft = -44.0

Example 2.20 , Page no:14

In [20]:
import math
from __future__ import division

#initialisation of variables
h=6; #height in ft
g=32; #gravitaional constant in ft/sec square

#CALCULATIONS
t=math.sqrt((2*h)/g); #calculating time

#RESULTS
print"Time in sec =",round(t,3);
Time in sec = 0.612