Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Placeholding again solution in Clear category for Speech Module by Tinus_Trotyl
TO20 = ("", "one ", "two ", "three ", "four ", "five ", "six ", "seven ", "eight ", "nine ", "ten ", "eleven ",
"twelve ", "thirteen ", "fourteen ", "fifteen ", "sixteen ", "seventeen ", "eighteen ", "nineteen ")
UP20 = ("", "", "twenty ", "thirty ", "forty ", "fifty ", "sixty ", "seventy ", "eighty ", "ninety ")
def checkio(n):
phr100, phr010, phr001 = TO20[n//100], UP20[n//10%10], TO20[n%10]
if n%100 < 20: phr001 = TO20[n%20]
if phr100: phr100 = phr100 + "hundred "
return (phr100 + phr010 + phr001)[:-1]
July 21, 2017