title: Printing table in python without modules
body: <p>We have this assignment and I spend some time on it...<br />
  Test script wants us to print this:</p>
  <pre><code>&gt;&gt;&gt; input([0, 1, 2, 3])
       x | sin(x) | cos(x) | tan(x)
  ---------------------------------
    0.00 |   0.00 |   1.00 |   0.00
    1.00 |   0.84 |   0.54 |   1.56
    2.00 |   0.91 |  -0.42 |  -2.19
    3.00 |   0.14 |  -0.99 |  -0.14
  </code></pre>
  <p>without using modules(we can use module MATH just using this as a hint
  <a href="https://docs.python.org/3/library/string.html#format-specification-mini-language" rel="nofollow noreferrer">https://docs.python.org/3/library/string.html#format-specification-mini-language</a></p>
  <p>Please help.
  This is what I have now:</p>
  <pre><code>import math
  def input(list):
      rad=[]
      sinvr=[]
      cosvr=[]
      tanvr=[]
      for el in list:
          sin=math.sin(el)
          sinvr.append(sin)
          cos=math.cos(el)
          cosvr.append(cos)
          tan=math.tan(el)
          tanvr.append(tan)
      print (&quot;     x | sin(x) | cos(x) | tan(x)\n---------------------------------&quot;)
  </code></pre>