Here is one approach.
import math
g = 9.81
def calc_range_height(v, alpha):
"""
Return the range and height of a projectile.
Return the range, R, and height, H, of a projectile launched with
velocity v at angle alpha to a stationary, horizontal surface.
Air-resistance is neglected.
"""
R = v**2 * math.sin(2.*alpha) / g
H = v**2 * math.sin(alpha)**2 / 2 / g
return R, H
# speed in m/s, elevation angle in radians (convert from degrees)
v, alpha = 10., math.radians(30.)
R, H = calc_range_height(v, alpha)
print('Range is {:.2f} m; Max height is {:.2f} m'.format(R,H))
For the test case suggested the output is:
Range is 8.83 m; Max height is 1.27 m