From d068c59fb7f68e8e75d478d28f8fe97078395f96 Mon Sep 17 00:00:00 2001 From: Ural Tunaboyu Date: Fri, 6 Dec 2024 10:35:49 -0800 Subject: [PATCH] added scales between unvigintillion and centillion --- demo.py | 2 ++ magic_numbers.py | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/demo.py b/demo.py index 2cb35f0..8e503ed 100644 --- a/demo.py +++ b/demo.py @@ -1,10 +1,12 @@ from magic_numbers import FORTY_TWO, SIXTY_NINE, FOUR_HUNDRED_AND_TWENTY from magic_numbers import ONE_THOUSAND_THREE_HUNDRED_AND_TWELVE +from magic_numbers import FOUR_CENTILLION_SIX_SEPTENONAGINTILLION print(f"{FORTY_TWO = }") print(f"{SIXTY_NINE = }") print(f"{FOUR_HUNDRED_AND_TWENTY = }") print(f"{ONE_THOUSAND_THREE_HUNDRED_AND_TWELVE = }") +print(f"{FOUR_CENTILLION_SIX_SEPTENONAGINTILLION = }") try: from magic_numbers import NOT_A_NUMBER diff --git a/magic_numbers.py b/magic_numbers.py index ca5fc0c..a445347 100644 --- a/magic_numbers.py +++ b/magic_numbers.py @@ -19,7 +19,25 @@ def _text2int(textnum: str, numwords={}) -> int | None: "quintillion", "sextillion", "septillion", "octillion", "nonillion", "decillion", "undecillion", "duodecillion", "tredecillion", "quattuordecillion", "quindecillion", "sexdecillion", "septemdecillion", - "octodecillion", "novemdecillion", "vigintillion", # PRs welcome (seriously) + "octodecillion", "novemdecillion", "vigintillion", "unvigintillion", + "duovigintillion", "tresvigintillion", "quattuorvigintillion", "quinvigintillion", + "sesvigintillion", "septemvigintillion", "octovigintillion", "novemvigintillion", + "trigintillion", "untrigintillion", "duotrigintillion", "trestrigintillion", + "quattuortrigintillion", "quintrigintillion", "sestrigintillion", "septentrigintillion", + "octotrigintillion", "noventrigintillion", "quadragintillion", "unquadragintillion", + "duoquadragintillion", "tresquadragintillion", "quattuorquadragintillion", "quinquadragintillion", + "sesquadragintillion", "septenquadragintillion", "octoquadragintillion", "novenquadragintillion", + "quinquagintillion", "unquinquagintillion", "duoquinquagintillion", "trequinquagintillion", + "quattuorquinquagintillion", "quinquinquagintillion", "sesquinquagintillion", "septenquinquagintillion", + "octoquinquagintillion", "novenquinquagintillion", "sexagintillion", "unsexagintillion", "duosexagintillion", + "tresexagintillion", "quattuorsexagintillion", "quinsexagintillion", "sesexagintillion", "septensexagintillion", + "octosexagintillion", "novensexagintillion", "septuagintillion", "unseptuagintillion", "duoseptuagintillion", + "treseptuagintillion", "quattuorseptuagintillion", "quinseptuagintillion", "seseptuagintillion", + "septenseptuagintillion", "octoseptuagintillion", "novenseptuagintillion", "octogintillion", "unoctogintillion", + "duooctogintillion", "tresoctogintillion", "quattuoroctogintillion", "quinoctogintillion", "sexoctogintillion", + "septemoctogintillion", "octooctogintillion", "novemoctogintillion", "nonagintillion", "unnonagintillion", + "duononagintillion", "trenonagintillion", "quattuornonagintillion", "quinnonagintillion", "senonagintillion", + "septenonagintillion", "octononagintillion", "novenonagintillion", "centillion", # PRs welcome (seriously) ] numwords["and"] = (1, 0) for idx, word in enumerate(units): numwords[word] = (1, idx)