Błąd typu: wymagany jest pływak
Nie można opublikować obrazu, więc:a[i]={(-1)^(i+1)*sin(x)*ln(x)}/{i^2*(i+1)!}
Zadanie:
Musisz znaleźć a1, a2, ..., an.
n jest naturalne i podane.
W ten sposób próbowałem to zrobić:
import math
a=[]
k=0
p=0
def factorial(n):
f=1
for i in range(1,n+1):
f=f*i
return f
def narys(n):
x=input('input x: ') #x isn't given by task rules, so i think that is error else.
float(x)
k=(math.pow(-1,n+1)*math.sin(x)*math.log10(n*x))/(n*n*factorial(n+1))
a.append=k
n=int(input('input n: '))
narys(n)
for i in a:
print(a[p])
p=p+1