Counting adventure by recursive

import re
U=S("_one_two_three_four_five_six_seven_eight_nine_one hundred","_")
exec'i+=1;N=U[i/10]+"ty-"+U[i%10];O="The #%%s&th positive integer is #%s#."%N%N\nfor s,r in zip(S("onety- tenone entwo ten(\w+) oty reet urty one&th two&th ree&th ve& vet ne& dty- y-& #ty-|&|-?# tt"),S(r"ten eleven welve \\1teen enty irt rty first second ird f ft n d ie  t"," ")):O=re.sub(s,r,O)\nprint O;'*input()

Note that non-ascii characters in the above source code will be escaped (such as \x9f).


return to the top page