3 comments:

  1. a=int(raw_input("number is "))
    s=0
    i=1
    k=1
    while a>0:
    s=s+pow(i,k)
    i=i+1
    k=k+1
    a=a-1
    print s
    number is 9
    405071317

    ReplyDelete

  2. num=int(raw_input("number is "))
    i=1
    total=0
    while i<=num:
    s=1
    a=i
    i=i+1
    while a>0:
    s=s*a
    a=a-1
    print s
    total=total+s
    print total

    ReplyDelete
  3. n=int(raw_input('enter the number'))
    i=1
    t=0
    while i<=n:
    s=1
    a=i
    i=i+1
    while a>0:
    s=s*a
    a=a-1
    print s
    t=t+s
    print t

    ReplyDelete