这是我尝试的代码,无法正常工作,我不知道问题所在
import math as m
def sinse(x,n):
sume=0
for i in range(n+1):
sume+=(m.pow(-1,i)*m.pow(x,2*i+1)/m.factorial(2*i+1))
return sume
n=int(input('Enter the value of n:'))
x=int(input('enter the value of X:'))
print(sinse(x,n))
如果这不是正确的代码,请在答案中添加其他任何代码