import math
#variable declaration
alpha=30 #angle of projection with the horizontal in degree
u=40 #velocity of projection in m/s
g=9.8 #gravity in m/s**2
#calculation
t=(2*u*math.sin(alpha*math.pi/180)/g)
#Result
print"t=",round(t,2),"s"
import math
#variable declaration
alpha=25 #angle of projection with the horizontal in degree
u=15 #velocity of projection in m/s
g=9.8 #gravity in m/s**2
#calculation
R=((u**2)*(math.sin((2*alpha)*math.pi/180))/g)
#Result
print"R=",round(R,1),"m"
import math
#variable declaration
alpha=45 #angle of projection with the horizontal in degree
u=100 #velocity of projection in m/s
g=9.8 #gravity in m/s**2
#calculation
H=((u**2)*math.sin((alpha*math.pi)/180)**2/(2*g))
#Result
print"H=",round(H,1),"m"
import math
#variable declaration
alpha=35 #angle of projection with the horizontal in degree
beta=15 #inclination of the plane in degree
u=10 #velocity of projection in m/s
g=9.8 #gravity in m/s**2
#calculation
t_1=(2*u*math.sin((alpha-beta)*math.pi/180)/(g*math.cos(beta*math.pi/180)))
t_2=(2*u*math.sin((alpha+beta)*math.pi/180)/(g*math.cos(beta*math.pi/180)))
#Result
print"Time of flight when the ball is projected upwards, t_1=",round(t_1,2),"s"
print"Time of flight when the ball is projected downwards, t_2=",round(t_2,2),"s"
import math
#variable declaration
alpha=55 #angle of projection with the horizontal in degree
beta=20 #angle of plane in degree
u=30 #velocity of projection in m/s
g=9.8 #gravity in m/s**2
pi=180 #pi in degree
#calculation
alpha=(pi/4)+(beta/2)
R=(u**2*(math.sin(((2*alpha)-beta)*math.pi/180)-math.sin(beta*math.pi/180))/(g*math.cos(beta*math.pi/180)**2))
t=(2*u*math.sin((alpha-beta)*math.pi/180))/(g*math.cos(beta*math.pi/180))
#Result
print"Maximum Range, alpha=",int(alpha),"degree"
print"Range of the projectile, R=",round(R,2),"m"
print"Time of flight, t=",round(t,2),"s"