我的代码:
import math
x = input()
print(math.asin(math.radians(float(x))))
我的x是0.7071067811865475,结果是0到1之间的一些不规则数字,但据我所知,应该是45左右
math.radians
转换为弧度,你想要math.degrees
。
它也在错误的地方,你正在转换一个数字,而不是一个角度。你要
print(math.degrees(math.asin(float(x))))
https://docs.python.org/3/library/math.html#angular-conversion