A Few More Things to Try

  • Expanded english_number. First, put in thousands; it should return 'one thousand' instead of (the sad) 'ten hundred' and 'ten thousand' instead of 'one hundred hundred'.

    Now expand upon english_number some more. For example, put in millions so you get 'one million' instead of 'one thousand thousand'. Then try adding billions, trillions, and so on.

  • Wedding number. How about wedding_number? It should work almost the same as english_number, except it should insert the word and all over the place, returning things like 'nineteen hundred and seventy and two', or however wedding invitations are supposed to look. I’d give you more examples, but I don’t fully understand it myself. You might need to contact a wedding coordinator ...

Get Learn to Program, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.