使用文字的计算器
mathwords的Python项目详细描述
数学单词
大多数人用词。许多人也使用计算器。因此,计算器也应该能够使用单词,这似乎是合乎逻辑的。这个项目的目的是朝这个方向努力。
要在交互模式下启动(使用非常糟糕的repl),请使用python -m mathwords
。
示例查询:
twelve plus three
->;fifteen
six raised to the power of three
->;two hundred sixteen
eight minus a billion
->;negative nine hundred ninety nine million nine hundred ninety nine thousand nine hundred ninety two
one hundred and forty four divided by two to the three
->;eighteen
eight divided by five
->;one point six
square root of the common log of ten quadrillion
->;four