- 4
Wap to find the sum of the seies: x-x^2/2!+x^3/3!-x^4/4!+x^5/5!-x^6/6!
I did this... x=int(input(" enter value for x")) j=int(input("enter value for j")) sum=0 fact =1 sign=1 for i in range(1,x+1): for j in range(1,j+1): fact= fact*1 sum+= (sign*(x**i)/fact*i)
1 Resposta
0
fact*1 ? You mean fact= fact*j;
sign value not altering.. sign=-sign
For last statement, indentation is missing..
Print the total sum last...
Hoping it helps you..