Z16010

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z16010"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z16008",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z610",
            "Z16K2": "def Z16008( Z16008K1 ):\n\timport math\n\tsmall_numbers_common = [\n\t\t\"\", \"en\", \"två\", \"tre\", \"fyra\", \"fem\", \"sex\", \"sju\", \"åtta\", \"nio\",\n\t\t\"tio\", \"elva\", \"tolv\", \"tretton\", \"fjorton\", \"femton\", \"sexton\",\n\t\t\"sjutton\", \"arton\", \"nitton\" ]\n\tsmall_numbers_neuter = [\n\t\t\"\", \"ett\", \"två\", \"tre\", \"fyra\", \"fem\", \"sex\", \"sju\", \"åtta\", \"nio\",\n\t\t\"tio\", \"elva\", \"tolv\", \"tretton\", \"fjorton\", \"femton\", \"sexton\",\n\t\t\"sjutton\", \"arton\", \"nitton\" ]\n\tdecades = [\n\t\t\"\", \"\", \"tjugo\", \"trettio\", \"fyrtio\", \"femtio\", \"sextio\", \"sjuttio\",\n\t\t\"åttio\", \"nittio\" ]\n\n\t# Get the name of numbers 1 to 999 (inclusive)\n\tdef get_num_below_thousand( number, is_neuter=False ):\n\t\tsmall_numbers = small_numbers_neuter if is_neuter else small_numbers_common\n\t\tif number == 0:\n\t\t\treturn \"\"\n\t\telif number \u003C 20:\n\t\t\treturn small_numbers[ number ]\n\t\telif number \u003C 100:\n\t\t\ttens_part = decades[ number // 10 ]\n\t\t\tsmall_numbers_part = small_numbers[ number % 10 ]\n\t\t\treturn tens_part + small_numbers_part if small_numbers_part else tens_part\n\t\telse:\n\t\t\treturn small_numbers_neuter[ number // 100 ] + \"hundra\" + get_num_below_thousand( number % 100, is_neuter )\n\n\t# Get the name of thousands exponents (1=\u003E\"tusen\", 2=\u003E\"miljon\", 3=\u003E\"miljard\" ...)\n\tdef name_of_exponent( exponent, is_plural ):\n\t\tif exponent == 1:\n\t\t\treturn \"tusen\"\n\t\tprefixes = [ \"m\", \"b\", \"tr\", \"kvadr\", \"kvint\", \"sext\", \"sept\", \"okt\", \"non\", \"dec\" ]\n\t\tsuffix = \"iljard\" if bool( exponent % 2 ) else \"iljon\"\n\t\tplural = \"er\" if ( is_plural and exponent \u003E 1 ) else \"\"\n\t\treturn prefixes[ exponent // 2 - 1 ] + suffix + plural\n\n\t# Convert numbers to words\n\tif Z16008K1 == 0:\n\t\treturn \"noll\"\n\telif Z16008K1 \u003C 1000:\n\t\treturn get_num_below_thousand( Z16008K1)\n\telif Z16008K1 \u003C 1000000000000000000000000000000000000000000000000000000000000000000:\n\t\treturn_string = \"\"\n\t\tremainder = Z16008K1\n\t\tlargest_exponent = math.floor( math.log( Z16008K1, 1000 ) )\n\t\tfor exponent in range( largest_exponent, 0, -1 ):\n\t\t\tmantissa_floored = remainder // 1000**exponent\n\t\t\tif mantissa_floored == 0:\n\t\t\t\tcontinue\n\t\t\texponent_is_neuter = ( exponent == 1 )\n\t\t\treturn_string += get_num_below_thousand( mantissa_floored, exponent_is_neuter ) + name_of_exponent( exponent, bool( mantissa_floored -1 ) ) + \" \"\n\t\t\tremainder %= 1000**exponent\n\t\treturn_string += get_num_below_thousand( remainder)\n\t\treturn return_string.strip()\n\telse:\n\t\t# Return the numerical number if it is too large for the algorithm\n\t\tWikifunctions.Error(\"Z28307\",[str(Z16008K1),str(1000000000000000000000000000000000000000000000000000000000000000000-1),\"sv\"])"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Swedish cardinal, python"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1004",
                "Z11K2": "cardinal en suédois, en Python"
            },
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1430",
                "Z11K2": "schwedische Kardinalzahl in Python"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    }
}