Z13588

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z13588"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z13587",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z610",
            "Z16K2": "def Z13587(Z13587K1):\n\tinput_value=Z13587K1\n\t# define the units and tens place\n\tones = [\"\", \"one \", \"two \", \"three \", \"four \", \"five \", \"six \", \"seven \", \"eight \", \"nine \", \"ten \", \"eleven \", \"twelve \", \"thirteen \", \"fourteen \", \"fifteen \", \"sixteen \", \"seventeen \", \"eighteen \", \"nineteen \"]\n\ttens = [\"\", \"\", \"twenty\", \"thirty\", \"forty\", \"fifty\", \"sixty\", \"seventy\", \"eighty\", \"ninety\"]\n\tunits = [(\"quattuordecillion\", 1_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000),(\"tredecillion\", 1_000_000_000_000_000_000_000_000_000_000_000_000_000_000),(\"duodecillion\", 1_000_000_000_000_000_000_000_000_000_000_000_000_000),(\"undecillion\", 1_000_000_000_000_000_000_000_000_000_000_000_000),(\"decillion\", 1_000_000_000_000_000_000_000_000_000_000_000),(\"nonillion\", 1_000_000_000_000_000_000_000_000_000_000),(\"octillion\", 1_000_000_000_000_000_000_000_000_000),(\"septillion\", 1_000_000_000_000_000_000_000_000),(\"sextillion\", 1_000_000_000_000_000_000_000),(\"quintillion\", 1_000_000_000_000_000_000), (\"quadrillion\", 1_000_000_000_000_000), (\"trillion\", 1_000_000_000_000), (\"billion\", 1_000_000_000), (\"million\", 1_000_000), (\"thousand\", 1_000), (\"hundred\", 100), (\"\", 1)]\n\n\t# Function to convert numbers less than 1000 to words\n\tdef words(Z13587K1):\n\t\tif Z13587K1 == 0:\n\t\t\treturn \"\"\n\t\telif Z13587K1 \u003C= 19:\n\t\t\treturn ones[Z13587K1]\n\t\telif Z13587K1 \u003C= 99:\n\t\t\ttens_unit = tens[Z13587K1 // 10]\n\t\t\tones_unit = ones[Z13587K1 % 10]\n\t\t\treturn tens_unit + \"-\" + ones_unit if ones_unit else tens_unit\n\t\telse:\n\t\t\tremainder = Z13587K1 % 100\n\t\t\tremainder_text = \"and \" + words(remainder) if remainder else \"\"\n\t\t\treturn ones[Z13587K1 // 100] + \"hundred \" + remainder_text\n\n\t# Convert numbers to words\n\tif Z13587K1 == 0:\n\t\treturn \"zero\"\n\telif Z13587K1 \u003C 0:\n\t\treturn \"negative \" + Z13587(-Z13587K1)\n\telse:\n\t\tresult = \"\"\n\t\tfor unit_name, factor in units:\n\t\t\tcount, Z13587K1 = divmod(Z13587K1, factor)\n\t\t\tif count \u003E 999:\n\t\t\t\tWikifunctions.Error(\"Z28307\",[str(input_value),\"999999999999999999999999999999999999999999999999\",\"en\"])\n\t\t\tif count \u003E 0:\n\t\t\t\tif factor == 1:\n\t\t\t\t\tresult = result + \" and \" + words(count) + unit_name\n\t\t\t\telse:\n\t\t\t\t\tresult = result + \" \" + words(count) + unit_name\n\t\tresult = result.strip()\n\t\tif result.startswith(\"and \"):\n\t\t\tresult = result[4:]  # Remove leading \"and\"\n\t\treturn result.strip()"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "English cardinal, python"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1014",
                "Z11K2": "Kadịnal Bekee, Python"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1430",
                "Z11K2": "Englische Kardinalzahl in Python"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1004",
                "Z11K2": "cardinal en anglais, en Python"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1643",
                "Z11K2": "영어 추기경, python"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "uses American names for very large numbers."
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1014",
                "Z11K2": "na-eji aha America maka ọnụọgụ buru ibu."
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1430",
                "Z11K2": "Python-Implementierung der Funktion zur Ausgabe der englischen Kardinalzahl"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1643",
                "Z11K2": "매우 많은 숫자에 미국식 이름을 사용합니다."
            }
        ]
    }
}