没有错误或其他任何内容。抱歉,我的代码看起来很奇怪:
import math
def forex(letter_x):
return math.sin(letter_x)/math.tan(letter_x)
for x in range(1,89):
new_l= x/(180/math.pi) # to convert to radians
for i in range(1,89):
new_k= i/(180/math.pi) #to convert to radians
if forex(new_l) == (math.sin(new_k)/math.sin(new_l)):
print(" X: ", str(x), " and i is ", str(i))
谢谢。
好的 我加了一点:为什么现在不起作用??
import math
def forex(letter_x):
return math.sin(letter_x)/math.tan(letter_x)
def forjay(og,letter_z):
return math.sin(og)/math.cos(letter_z)
for x in range(1,89):
new_l= x/(180/math.pi) # to convert to radians
for i in range(1,89):
new_k= i/(180/math.pi) #to convert to radians
for x in range(1,89):
new_j = x/(180/math.pi)
a = forex(new_1)
if round(forex(new_l), 1) == round((math.sin(new_k)/math.sin(new_l)), 1) and round(a, 1) == round((forjay(new_l,new_j),1):
print(" X: ", str(x), " and i is ", str(i))