Exercise: Digit to English Word

Write a program digit.py that takes a single digit as commandline parameter. Print the English word for that digit.

$ python digit.py 7
seven
  • Use a dictionary (key: int, value: str) for the translation.

  • Valid inputs are digits 0 - 9. Outputs are the corresponding lowercase english words for that digit.

Dependencies

cluster_python Python Programming cluster_python_exercises Exercises cluster_python_exercises_legacy Exercises (Legacy) cluster_python_basics Python: The Language Fundamentals python_exercises_legacy_cmdline_digit Exercise: Digit to English Word python_basics_python_0139_commandline_argv Commandline Arguments (sys.argv) python_exercises_legacy_cmdline_digit->python_basics_python_0139_commandline_argv python_basics_python_0120_helloworld Hello World python_exercises_legacy_cmdline_digit->python_basics_python_0120_helloworld python_basics_python_0150_datatypes_overview_compound Compound Datatypes python_exercises_legacy_cmdline_digit->python_basics_python_0150_datatypes_overview_compound python_basics_python_0150_datatypes_overview Datatypes python_exercises_legacy_cmdline_digit->python_basics_python_0150_datatypes_overview python_basics_python_0125_running Running Python Programs python_basics_python_0139_commandline_argv->python_basics_python_0125_running python_basics_python_0130_syntax_etc Syntax etc. python_basics_python_0139_commandline_argv->python_basics_python_0130_syntax_etc python_basics_python_0110_blahblah Blahblah python_basics_python_0120_helloworld->python_basics_python_0110_blahblah python_basics_python_0125_running->python_basics_python_0120_helloworld python_basics_python_0150_datatypes_overview_compound->python_basics_python_0150_datatypes_overview python_basics_python_0140_variables Variables python_basics_python_0140_variables->python_basics_python_0130_syntax_etc python_basics_python_0150_datatypes_overview->python_basics_python_0140_variables python_basics_python_0130_syntax_etc->python_basics_python_0120_helloworld