Example 1.a Calculate tan𝜶
where 𝜶 = 91455.8
Given 12 hours equals 360 degrees, then convert 𝜶 to radians.
import math
def tan(a):
assert len(a) == 3, 'invalid params'
h = a[0]
m = a[1]
s = a[2]
#first convert a to hours in decimals
hours = h + m/60 + s/3600
print('the hours: ', hours)
#Then, multiplying by 15, obtain the degree
degree = 15 * hours
print('the degree: ', degree)
#Multiplying the degree by 𝜋/180 gives a in radians
radians = degree * math.pi / 180
print('the radians:', radians)
tana = math.tan(radians)
print('the tan𝜶: ', tana)
return tana
ta = tan([9, 14, 55.8])
print(ta)