title: How to get sum of divisors in my program?
body: <p>In my program, it is supposed to ask the user for a number, then displays all the divisors possible, but in the end, it has to display the sum of all the divisors. I'm having trouble with the last part and would appreciate some help.</p>
  
  <p>My code:</p>
  
  <pre><code>    prompt = int(input("Enter an interger: "))
  
  print("The divisors of the integer you entered are: ")
  for i in range(1, prompt+1):
      if(prompt%i==0):
          print(i)
          print(f")
  </code></pre>
  
  <p>Example if user inputed 20:</p>
  
  <pre><code>The divisors of the integer you entered are:
  
  1
  
  2
  
  4
  
  5
  
  10
  
  20
  
  The sum of the divisors is: 42
  </code></pre>