Python Forum
looking 4 py code: convert int numbers to their name
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looking 4 py code: convert int numbers to their name
#1
i'm just so sure someone has already done this in python ... convert a number, at least an int, to its number name.

[numname(n) for n in range(5)] -> ['zero', 'one', 'two', 'three', 'four']

numname(18512) -> 'eighteen thousand five hundred twelve'

numname(-2000000000000) -> 'minus two trillion'
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
looking 4 py code: convert int numbers to their name - by Skaperen - Feb-08-2017, 05:03 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020