title: python: converting two numbers to words
body: <p>I have a program that currently takes two number and converts them into words in fraction from,
  for example&quot; frac(2,3) should return &quot;two thirds&quot;, but I need help with the second input, in converting that to the word &quot;third&quot;. right now something like frac (2,3) would return just &quot;two&quot; but I need it to return &quot;two thirds&quot;</p>
  <p>my program:</p>
  <pre><code>def frac (numer, den):
      top = {'1': &quot;one&quot;, '2': &quot;two&quot;, '3': &quot;three&quot;, '4': &quot;four&quot;, '5': &quot;five&quot;, '6': &quot;six&quot;,
              '7': &quot;seven&quot;, '8': &quot;eight&quot;, '9': &quot;nine&quot;, '0': &quot;zero&quot;}
      bottom = {'2': &quot;half&quot;, '3': &quot;third&quot;, '4':&quot;Fourth&quot;,'5':&quot;Fifth&quot;,'6':&quot;sixth&quot;,'7':&quot;seventh&quot;,'8':&quot;eighth&quot;,'9':&quot;ninth&quot;,'10':&quot;tenth&quot;}
      return &quot; &quot;.join(map(lambda x: top[x], str(numer)))
  
  
  </code></pre>