In [1]:

```
import math #Example 3_1
#To find the balls instantaneous velocity and Average Velocity
d1=8.6 #units in meters
t1=0.86 #units in sec
vp=d1/t1 #units in meters/sec
print "The Instantaneous Velocity at P Vp=",round(vp)," meters/sec\n"
#The ball stops at position Q Hence vp=0 met/sec
vq=0 #units in meters/sec
print "The Instantaneous Velocity at Q Vq=",round(vq,10)," meters/sec\n"
d2=-10.2 #units in meters
t2=1.02 #units in sec
vn=d2/t2 #units in meters/sec
print "The Instantaneous Velocity at N Vn=",round(vn)," meters/sec\n"
d3=20 #units in meters
t3=2.0 #units in sec
vAQ=d3/t3 #units in meters/sec
print "The Average Velocity between A and Q is VAQ=",round(vAQ)," meters/sec\n"
d4=0 #units in meters
t4=4.0 #units in sec
vAM=d4/t4 #units in meters/sec
print "The Average Velocity between A and M is VAM=",round(vAM,10)," meters/sec\n"
```

In [2]:

```
import math #Example 3_2
#To calculate the Acceleration
v1=20.0 #units in meters/sec
v2=15.0 #units in meters/sec
t1=0 #units in sec
t2=0.5 #units in sec
c_v=v2-v1 #units in meters/sec
c_t=t2-t1 #units in sec
acceleration=c_v/c_t #units in meters/sec**2
print "Acceleration a=",round(acceleration,2)," meters/sec**2"
```

In [3]:

```
import math #Example 3_3
#To find acceleration and the distance it travels in time
vf=5.0 #units in meters/sec
v0=0 #units in meters/sec
t=10.0 #units in sec
a=(vf-v0)/t #units in meters/sec**2
v_1=(vf+v0)/2 #unis in meters/sec
x=v_1*t #units in meters
print "Acceleration is a=",round(a,1)," meters/sec\n"
print "Distance travelled is x=",round(x)," meters"
```

In [4]:

```
import math #Example 3_4
#To find acceleration and time taken to stop
v0=5.0 #units in meters/sec
vf=0 #units in meters/sec
v_1=(v0+vf)/2 #units in meters/sec
x=20.0 #units in meters
t=x/v_1 #units in sec
a=(vf-v0)/t #units in meters/sec**2
print "Acceleration is a=",round(a,3)," meters/sec**2\n"
print "Time taken to stop t=",round(t)," sec"
```

In [6]:

```
import math #Example 3_5
#To calculate the speed and time to cover
a=4.0 #units in meters/sec**2
x=20.0 #units in meters
vf=math.sqrt(a*x*2) #units in meters/sec
t=vf/a #units in sec
print "Speed vf=",round(vf,2)," meters/sec\n"
print "Time taken T=",round(t,2)," sec"
```

In [7]:

```
import math #Example 3_6
#To find the time taken by a car to travel
x=98.0 #uniys in meters
a=4.0 #units in meters/sec**2
t=math.sqrt((2*x)/a) #units in sec
print "Time taken by a car to travel is T=",round(t)," sec"
```

In [8]:

```
import math #Example 3_7
#To calculate the time taken to travel
v0=16.7 #units in meters/sec
a=1.5 #units in meters/sec**2
x=70 #units in meters
t=-((-v0)+math.sqrt(v0**2-(4*(a/2)*x)))/(2*(a/2)) #units in sec
print "Time taken to travel T=",round(t,1)," sec"
```

In [9]:

```
import math #Example 3_8
#To calculate the acceleration
vf=30.0 #units in meters/sec
v0=0 #units in meters/sec
t=9.0 #units in sec
a=(vf-v0)/t #units in meters/sec**2
a=a*(1/1000.0)*(3600.0/1)*(3600.0/1) #units in km/h**2
print "Acceleration a=",round(a)," km/h**2"
```

In [14]:

```
import math #Example 3_9
#To find how above the water is the bridge
v0=0 #units in meters/sec
t=3.0 #units in sec
a=-9.8 #units in meters/sec**2
y=(v0*t)+(0.5*a*t**2) #units in meters
print "The bridge is y=",round(y)," meters above the water"
```

In [10]:

```
import math #Example 3_10
#To find out how high does it goes and its speed and how long will it be in air
vf=0 #units in meters/sec
v0=15 #units in meters/sec
a=-9.8 #units in meters/sec**2
y=(vf**2-v0**2)/(2*a) #units in meters
print "Distance it travels is y=",round(y,1)," meters\n"
vf=-math.sqrt(2*a*-y) #units in meters/sec
print "The speed is vf=",round(vf)," meters/sec\n"
t=vf/(0.5*a) #units in sec
print "Time taken is T=",round(t,2)," sec"
```

In [11]:

```
import math #Example 3_11
#To find out how fast a ball must be thrown
a=9.8 #unita in meters/sec**2
t=3 #units in sec
v=(0.5*a*t**2)/t
print "The speed by which the ball has to be thrown is v=",round(v,1)," meters/sec"
```

In [12]:

```
import math #Example 3_12
#To find out where the ball will hit the ground
#Horizontal
y=2 #units in meters
a=9.8 #units in meters/sec**2
t=math.sqrt(y/(0.5*a)) #units in sec
v=15 #units in meters/sec
x=v*t #units in sec
print "The ball hits the ground at x=",round(x,2)," meters"
```

In [13]:

```
import math #Example 3_13
#To find out at what height above ground does it hit wall and is it still going up befor it hits or down
v_1=24.0 #units in meters/sec
x=15.0 #units in meters
t=x/v_1 #units in sec
v0=18 #units in meters/sec
a=-9.8 #units in meters/sec**2
y=(v0*t)+(0.5*a*t**2) #units in meters
print "The arrow hits y=",round(y,1)," meters above the straight point\n"
v=v0+(a*t) #units in meters/sec
print "The Vertical componet of velocity is v=",round(v,1)," meters/sec\n"
print "As V is Positive the arrow is in its way up\n"
vtotal=math.sqrt(v**2+v_1**2) #units in meters/sec
print "The magnitude of velocity is vtotal=",round(vtotal,1)," meters/sec"
```