title: Python - Sum of the factorials
body: <pre><code>B=0
  A=1
  m=int(input("input a number please "))
  for k in range (1,m+1) :
      for i in range (1,k+1) :
      A=i*A
      B=B+A
  print("this is your number",B)
  </code></pre>
  
  <p>if i type 4 ,this gives me 418 , it's supposed to give me 32, what am i doing wrong here?</p>
  
  <p>I've tried everything to correct it </p>
  
  <p>Edit : this to calculate the sum of factorials , if i type 4 it will calculate 1! + 2! + 3! + 4!</p>