Ask Your Question

Revision history [back]

Here are some inputs:

  • To read and loop over the entries of the file, you should have a look at the Python csv module, the web has tons of examples.
  • Given a string s representing an integer, you can transform it as a Sage integer as ZZ(s).
  • Be careful that angles in Sage are in radians, not degrees, so sin(45) will not give you sqrt(2)/2 but sin(pi/4) will.
  • Given a symbolic experssion E, you can get its latex string representation with latex(E).

For example:

sage: latex(sin(pi/4))
\frac{1}{2} \, \sqrt{2}

You should get enough information to reach your goal.