Python Program to print sum of series # 1/1! + 2/2! + 3/3! + ....... + n/n!


# sum = 1/1! + 2/2! + 3/3! ... n/n!


n = int (input ('Enter value for n: '))

sum =0

for i in range (1,n+1):

    f=1

    for j in range(1,i+1):

        f=f*j

    sum+= (i/f)

print ('Sum of series= ', sum)

Comments

Some popular posts

Python Program that computes the net amount of a bank account based a transaction log from console input.