我做了一个三角计算器(有点——它现在只使用正弦比)但我不能让它正常工作。我收到一个错误,说数学在应该得到行的长度时没有定义。这是我的代码:
trig = raw_input ('What are you looking for? A) I have the opposite, and I want the Hypotenuse. ')
if trig.lower() == 'a':
ang = raw_input ('Please enter the measure of the angle you have ')
line = raw_input ('Please enter the length of the opposite! ')
math.asin (ang)*line