Skip to content

Commit

Permalink
Merge pull request #1 from uraltunaboyu/more_scales
Browse files Browse the repository at this point in the history
added scales between unvigintillion and centillion
  • Loading branch information
DavidBuchanan314 authored Dec 6, 2024
2 parents e64c6f4 + d068c59 commit 621ee30
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions demo.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
20 changes: 19 additions & 1 deletion magic_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 621ee30

Please sign in to comment.