This is the Number-to-Word function for Turkish
It's very easy. Let's type a number in the string format as the input. If you want to use some punctuations such as comma or full stop to divide the number to units easily, it doesn't matter. Here's an example:
n2w("84680273")
n2w("84.680.273")
The maximum limit of the function is katrilyon (it means quadrillion), but it's possible to extend it if you need more. You can add names of the bigger units such as kentilyon, sekstilyon, septilyon into the unitnames
variable. See at here.
unitnames = ["", "bin ", "milyon ", "milyar ", "trilyon ", "katrilyon "]
- Some improvements for the current function
- The w2n function