Solutions in place

This commit is contained in:
Chris Proctor
2023-08-04 12:07:51 -04:00
parent 798df2d2cb
commit cdfff4eb5f
5 changed files with 30 additions and 3 deletions

13
nw.py Normal file
View File

@@ -0,0 +1,13 @@
# cli.py
# ------
# Implements a simple number-to-text command-line interface.
from argparse import ArgumentParser
from numberwords import int_under_1000000_to_text
parser = ArgumentParser("Print out a number as it is spoken in English.")
parser.add_argument("number", type=int)
args = parser.parse_args()
text = int_under_1000000_to_text(args.number)
print(text)