Let n be a five digit number such as 12345 when we say this


Let n be a five digit number, such as 12345. When we say this number out loud, we might say it as 'one two three four five'.

Using python 3,design a function digit_to_string(n): that converts a five digit number n to a string of its spoken equivalent.

For example:

  • Ifn = 34689,digit_to_string(n)should return'three four six eight nine'.
  • Ifn = 10101,digit_to_string(n)should return'one zero one zero one'.
  • Ifn = 35,digit_to_string(n)should return'zero zero zero three five'.

Solution Preview :

Prepared by a verified Expert
Business Management: Let n be a five digit number such as 12345 when we say this
Reference No:- TGS02806309

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)