Z18700

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z18700"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z18699",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z610",
            "Z16K2": "# This concept is adapted from the Central Kurdish Wikipedia's Number to Word module:\n# https://ckb.wikipedia.org/wiki/Module:Number_to_word\n# originally created on the Persian Wikipedia.\n# Supports numbers up to 36 digits only with positive and negative numbers.\n\ndef Z18699(Z18699K1):\n\t# Kurdish words for units, tens, hundreds, and exceptions\n\tyekan = [*, 'یەک', 'دوو', 'سێ', 'چوار', 'پێنج', 'شەش', 'حەوت', 'ھەشت', 'نۆ']\n\tdahgan = [*, *, 'بیست', 'سی', 'چل', 'پەنجا', 'شەست', 'حەفتا', 'ھەشتا', 'نەوەد']\n\tsadgan = [*, 'سەد', 'دووسەد', 'سێسەد', 'چوارسەد', 'پێنجسەد', 'شەسسەد', 'حەوتسەد', 'ھەشتسەد', 'نۆسەد']\n\texceptions = ['دە', 'یازدە', 'دوازدە', 'سێزدە', 'چواردە', 'پازدە', 'شازدە', 'حەڤدە', 'ھەژدە', 'نۆزدە']\n\tscale = [*, ' ھەزار', ' ملیۆن', ' ملیار', ' بلیۆن', ' بلیارد', ' ترلیۆن', ' ترلیارد', ' کوادرلیۆن', ' کادریلیارد', ' کوینتیلیۆن', ' کوانتینیارد']\n\n\t# Mapping for converting Eastern Arabic numerals to Western Arabic numerals\n\teastern_arabic_numerals = {\n\t\t'٠': '0', '١': '1', '٢': '2', '٣': '3', '٤': '4', \n\t\t'٥': '5', '٦': '6', '٧': '7', '٨': '8', '٩': '9'\n\t}\n\t\n\tdef convert_eastern_arabic_to_arabic(numeral_string):\n\t\treturn *.join(eastern_arabic_numerals.get(char, char) for char in numeral_string)\n\t\n\tdef threedigit_words(threedigit):\n\t\twords = *\n\t\t# Handle hundreds\n\t\tif threedigit[0] != '0':\n\t\t\twords = sadgan[int(threedigit[0])]\n\t\t\n\t\t# Handle special case for tens (10-19)\n\t\tif threedigit[1] == '1':\n\t\t\tif words:\n\t\t\t\twords += ' و '\n\t\t\twords += exceptions[int(threedigit[2])]\n\t\telse:\n\t\t\t# Handle tens\n\t\t\tif threedigit[1] != '0':\n\t\t\t\tif words:\n\t\t\t\t\twords += ' و '\n\t\t\t\twords += dahgan[int(threedigit[1])]\n\t\t\t\tif threedigit[2] != '0':\n\t\t\t\t\twords += ' و '\n\t\t\telse:\n\t\t\t\tif threedigit[2] != '0':\n\t\t\t\t\tif words:\n\t\t\t\t\t\twords += ' و '\n\t\t\t# Handle units\n\t\t\tif threedigit[2] != '0':\n\t\t\t\twords += yekan[int(threedigit[2])]\n\t\t\n\t\treturn words.strip()\n\n\t# Handle negative numbers and convert Eastern Arabic numerals\n\tstrnumber = str(Z18699K1)\n\tis_negative = strnumber.startswith('-') or strnumber.startswith('−')\n\tif is_negative:\n\t\tstrnumber = strnumber[1:]  # Remove the negative sign for processing\n\t\n\tstrnumber = convert_eastern_arabic_to_arabic(strnumber)\n\t\n\t# Check if the number is zero\n\tif strnumber == '0':\n\t\treturn 'سفر'\n\t\n\tlength = len(strnumber)\n\n\t# Ensure the number does not exceed the limit\n\tif length \u003E len(scale) * 3:\n\t\treturn \"Input exceeds the limit. A maximum of 36 digits is allowed. Please enter a shorter value.\"\n\n\t# Pad the number with leading zeros to ensure it has a length that is a multiple of 3\n\tif length % 3 != 0:\n\t\tstrnumber = '0' * (3 - length % 3) + strnumber\n\n\t# Process the number in groups of three digits\n\tgroups = len(strnumber) // 3\n\twords = *\n\tgroup = groups\n\n\twhile group \u003E 0:\n\t\tthreedigit = strnumber[(group - 1) * 3:group * 3]\n\t\tword3 = threedigit_words(threedigit)\n\t\tif word3:\n\t\t\tif group != groups:\n\t\t\t\tif words:\n\t\t\t\t\twords = word3 + scale[groups - group] + ' و ' + words\n\t\t\t\telse:\n\t\t\t\t\twords = word3 + scale[groups - group] + words\n\t\t\telse:\n\t\t\t\twords = word3 + scale[groups - group] + words\n\t\tgroup -= 1\n\n\t# Add the negative sign if needed\n\tif is_negative:\n\t\twords = 'سالب ' + words\n\n\treturn words.strip()\n"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1288",
                "Z11K2": "بگۆڕی ژمارە بۆ نووسینی کوردیی ناوەندی بە پایتن"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Number2Words in Kurdish Python"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1014",
                "Z11K2": "Ọnụọgụ 2 Okwu na Kurdish Python"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1288",
                "Z11K2": "ژمارەیەک بە زنجیرەنووسەی عەرەبی یان ھیندۆ-عەرەبی وەردەگرێ و بە نووسینی کوردیی ناوەندی دەیگەڕێنێتەوە. تا ٣٦ ژمارە بە مووجەب و سالبەوە قبووڵ دەکات."
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Takes a number in Arabic or Indo-Arabic and returns it in Central Kurdish words. Accepts up to 36 positive and negative numbers."
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1014",
                "Z11K2": "Na-ewere nọmba na Arabic ma ọ bụ Indo-Arabic wee weghachi ya n'okwu Central Kurdish. Nabata ruo ọnụọgụ 36 dị mma na nke adịghị mma."
            }
        ]
    }
}