Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Speech Module by android.pavlov
say = {
1 :"one",2 :"two",3 : "three", 4 :"four", 5 : "five", 6 : "six", 7 : "seven",8 : "eight", 9 : "nine",
10 : "ten", 11 : "eleven", 12 : "twelve", 13: "thirteen", 14 : "fourteen", 15 : "fifteen",
16 : "sixteen", 17 : "seventeen", 18 : "eighteen", 19 : "nineteen",
20 : "twenty", 30 : "thirty", 40 : "forty", 50 : "fifty",60 :"sixty",
70 : "seventy", 80 : "eighty", 90 : "ninety"}
def checkio(number):
verbose_num = ""
if number > 99:
hundreds = number // 100
number = number % 100
verbose_num = say[hundreds] + " hundred"
if number > 20:
tens = number // 10
number = number % 10
verbose_num = verbose_num + " " + say[tens * 10]
if number > 0:
verbose_num = verbose_num + " " + say[number]
return verbose_num.strip()
Sept. 2, 2015