title: Can python code results be written in Latex?
body: <p>I am really new in programming, sorry for the awful way of asking.</p>
  
  <p>So for a class of kids I'm helping I am trying to make a program in python which must assign a random integer to 2 variables "A" &amp; "B", once that is done, we must check if the ratio A/B yields an integer.</p>
  
  <p>If that is the case, then we must have python print "A/B=~" so we must print this as a question without displaying the answer.</p>
  
  <p>I achieved this by printing the variables as text once I checked the previously stated condition. So far everything is fine. I did this with a loop 5 times and got 5 different questions. I made it in such a way that changing I couple numbers I can make as many questions as I want.
  Just to give an example I got:</p>
  
  <pre><code>14/7=
  56/8=
  35/5=
  7/1=
  81/3=
  </code></pre>
  
  <p>So the python part was basically done.</p>
  
  <p>What I am unable to do and would appreciate if anyone could help me is the next part.</p>
  
  <p>I have to take this results and and be able to make a pdf, if possible with latex, with the caveat that i don't like the idea of manually typing said results since for all the kids I have to do this around 180 times (30 times per kid). Is there a way to do this, since typing all manually in latex would take forever.</p>