title: Triangular Numbers Using Loops (Python)
body: <p>I'm currently working on a project that I'm working on, and I'm currently learning about looping. Here is the direction as follows...</p>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <blockquote>
          <p>Triangular numbers are numbers of objects that could be arranged in a triangle by     making rows, with one more object in each row than in the previous row. Write a function that given a number, n, will formulaically compute the nth Triangular number. Write another function that displays the Triangular numbers up to and including n.</p>
          
          <p>The formula states (n(n+1))/(2) or (n^(2)+n)/(2)                </p>
        </blockquote>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>So pretty much I think I would need to formulate a function that whatever I enter for n to the equation I would get the answer. However, my question is I don't understand how loops is used in this scenario. I have done the following but I'm getting an error. I think it should very simple right?</p>
  
  <pre><code>n=int(input("Please Enter n:"))
  y1=((n**2)+n)/(2)   
  print (y1)
  </code></pre>
  
  <p>I think the code above answers the first question where it formulaically compute the nth Triangular number, given inputing n. However, I'm having a hard time to write a function for the second question where a function that displays the Triangular numbers up to and including n. Thank you very much for your help.</p>