title: calculate tetrahedral no for all n number give in a range, store it in list and return it
body: <p>Define a function which takes two input 1. startvalue 2. endvalue
  calculate a tetrahedral no inclusive of startvalue and endvalue. store the output in list format and return to main function.
  convert the list to str to display
  here is what I have tried but unable to get the complete output.</p>
  <pre><code>def calculateNTetrahedralNumber(startvalue, endvalue):
      n = startvalue
      y = endvalue+1
      result = []
      while (n &lt; y):
          result.append(((n*(n+1)*(n+2))/6))
          n = n+1
      return(result)
          
  
  if __name__ == '__main__':
      fptr = open(os.environ['OUTPUT_PATH'], 'w')
  
      startvalue = int(input().strip())
  
      endvalue = int(input().strip())
  
      result = calculateNTetrahedralNumber(startvalue, endvalue)
      print(result)
  
      fptr.write('\n'.join(map(str, result)))
      fptr.write('\n')
  
      fptr.close()
  </code></pre>
  <p>User entered data
  start value = 1
  end value 7
  Output
  1</p>
  <p>Expected output</p>
  <p>1
  4
  10
  20
  35
  56
  84</p>