import math # 定义角度 angle_54 = 54 angle_18 = 18 # 将角度转换为弧度 rad_54 = math.radians(angle_54) rad_18 = math.radians(angle_18) # 计算正切值的平方 tan_54_squared = math.tan(rad_54) ** 2 tan_18_squared = math.tan(rad_18) ** 2 # 计算结果 result = tan_54_squared - tan_18_squared print(result)