title: Using Taylor expansion to calculate pi with an user set precision value
body: <p>The input is the precision to which pi is calculated and I need to output the value of calculated pi and the number of terms to reach that value.</p>
  <p>This is the code that I have made and it is supposed to print out (3.33968, 5). Could someone check where I have went wrong?</p>
  <pre><code>t_precisionstr = input(&quot;Precision Value for Taylor: &quot;)
  t_precision = float(t_precisionstr)
  
  t_list = []
  def taylor(t_precision):
      t_number1 = 0
      t_number2 = 1
      t_final = 0
      while t_final &lt;= abs(m.pi - t_precision):
          t_number1 = t_number1 + 1
          t_answer = t_number2 + ((-1)**t_number1 / (2*t_number1+1))
          print(t_answer)
          t_number = t_number1 + t_number2
          t_number2 = 0
          t_list.append(t_answer)
          t_final = 4 * (sum(t_list))
          return(t_final,t_number+1)
  print(taylor(t_precision))
  </code></pre>