title: prints the sum of the numbers 1 to n in python
body: <p><strong>GOAL:</strong>
  Write a program that asks the user for a number <code>n</code> and prints the sum
  of the numbers 1 to n.  The program keeps asking for a number until
  the user enters 0.</p>
  
  <pre><code>expected output:
  enter an integer number (0 to end): 5
  1+2+3+4+5 = 15
  </code></pre>
  
  <p>I am able to solve the second problem which is until the user enters 0.
  the problem I'm having is printing the numbers in a loop. </p>
  
  <pre><code>1+2+3+4+5 = 15
  </code></pre>
  
  <p>I am thinking maybe if I use a loop within a loop I can accomplish this. This is my current code.I've seen other questions answer this programming question but I wanna know how to specifically print the numbers leading up to the number I entered</p>
  
  <pre><code>num = int(input( "enter a integer: " ))
  sum_num =0
  
  if num != 0:
     for i in range(1, num+1): 
         sum_num += i
         print(sum_num)
  else:
       exit()
  </code></pre>