所以我不断收到此错误 print(float(side / (math.sin(math.radians(float( Degree)))))) TypeError: unsupported operand type(s) for /: 'str' and 'float'
import math
# for anyone looking at this input opp, 10.7, 65, sin, no
print("This only works for right triangles")
print("opp = opposite adj = adjacent")
# variables
side1 = input("Input if your trying to find opposite or adjacent: ")
side = input("input length of one side: ")
degree = input("Input angle cant use the right angle: ")
trig_ratio = input("Input either sin cos tan: ")
pos_angle = input("is the right angle below the angle: ")
# sin
if trig_ratio == "sin"\
and pos_angle == "no"\
and side1 == "opp":
print(float(side / (math.sin(math.radians(float(degree))))))
ibeautiful
一只萌萌小番薯
跃然一笑
开心每一天1111
相关分类