title: Error: Index out of bounds - Python
body: <p>I am still fairly new to Python and I am attempting to run a for loop. However, I receive an error indicating that my index is out of bounds. I'm not sure what exactly the problem is, any help is appreciated!</p>
  
  <p>My code and error are both below:   </p>
  
  <pre><code>croot = 1
  ctip = 1
  span = 1
  thetaroot = 0
  thetatip = 0
  a0root = 0.11
  a0tip = 0.11
  alpha = 0
  alpha0root = -2.5
  alpha0tip = -2.5
  thetaroot = thetaroot * atan(1.) / 45.
  thetatip = thetatip * atan(1.) / 45.
  alpha = alpha * atan(1.) / 45.
  alpha0root = alpha0root * atan(1.) / 45.
  alpha0tip = alpha0tip * atan(1.) / 45.
  n = 10
  theta = zeros((1,n))
  y = zeros((1,n))
  c = zeros((1,n))
  cl = zeros((1,n))
  alp = zeros((1,n))
  a = zeros((1,n))
  rhs = zeros((n,1))
  b = zeros((n,1))
  a = zeros((n,1))
  #
  # Define properties at n span stations
  #
  pi = 4. * atan(1.)
  for i in range(1,n):
      theta[i] = i * pi / (2. * n)
      y[i] = span * 0.5 * cos(theta[i])
      c[i] = croot + (ctip - croot) * y[i] * 2. / span
      alp[i] = alpha + thetaroot - (alpha0root + (alpha0tip - alpha0root + thetaroot - thetatip) * y[i] * 2. / span)
      a[i] = a0root + (a0tip - a0root) * y[i] * 2. / span
  
  pi = 4. * atan(1)
  </code></pre>
  
  <p>I then receive the error </p>
  
  <pre><code>---------------------------------------------------------------------------
  IndexError                                Traceback (most recent call last)
  &lt;ipython-input-8-8710173d8f43&gt; in &lt;module&gt;()
       29 pi = 4. * atan(1.)
       30 for i in range(1,n):
  ---&gt; 31     theta[i] = i * pi / (2. * n)
       32     y[i] = span * 0.5 * cos(theta[i])
       33     c[i] = croot + (ctip - croot) * y[i] * 2. / span
  
  IndexError: index 1 is out of bounds for axis 0 with size 1
  </code></pre>