title: Find total sum and sum of numbers in range based on condition
body: <p>I want to create a function <code>my_sum_div(a, b, div=10)</code> which will compute the sum of numbers from <code>a</code> to <code>b</code>, prints out this sum, but also all intermediate sums of type <code>a+(a+1)+(a+2)+(a+3)</code> that are divisible by <code>div</code>.
  I want the program to work as follows:</p>
  
  <pre><code>    my_sum_div(1, 10, 2)
  </code></pre>
  
  <p>The output should look like:</p>
  
  <pre><code>sums divisible by 2:
  6
  10
  28
  36
  sum of numbers between 1 and 10 is: 55
  </code></pre>
  
  <p>Now I have already done this:</p>
  
  <pre><code>    def my_sum(a, b):
      print("sum of numbers between", a," and", b," is", sum(i for i in 
      range(a, b+1)))
  
      def my_sum_div(a, b, div = 3):
      print("sums divisible by", div,":")
  
      l = []
      s = ","
      x = sum(i for i in range(a, b+1)
      for i in range(a, b+1):
          if (i%div==0):
              l.append(str(i))
  
      print(s.join(l))
  
      print("sum of numbers between", a, " and", b, " is", sum(i for i in 
      range(a, b + 1))
  </code></pre>
  
  <p>Ive been trying for hours. I know my code only checks what numbers between <code>(a, b+1)</code> are divisible by <code>div</code>, but how do I make it so that the function computes and prints all the intermediate sums that are divisible by <code>div</code>? My first function only computes the sum of all integers in the given interval. I now want the subsequent function to compute all intermediate sums that are divisible by div in a given interval and print all of these. </p>
  
  <p>Thank you in advance.</p>