1
Write a program to calculate the value of the series, for N terms.
S = 0 + 1/2! + 2/4! + 3/6! + ...
I started to do the program as shown in the code below, but I’m not getting the right result.
Please help me! Thank you!
def fatorial_for(numero):
resultado = 1
for k in range(1, numero + 1):
resultado *= k
return resultado
n = int(input('Digite um número inteiro positivo: '))
s = 0
for i in range(0, n + 1):
for j in range(1, n + 1):
s = s + (i / fatorial_for(j * 2))
print(s)
Wow, now that I’ve come to see that you really don’t need it, thank you very much!!
– Tryford