# I want solution for this question please

68 views

### mohamed

Sep 19, 2011, 4:54:59 PM9/19/11
to Building Skills Books
Check Amount Writing.
Translate a number into the English phrase.
This example algorithm fragment is only to get you started. This shows
how to pick off the digits from
the right end of a number and assemble a resulting string from the
left end of the string.
Note that the right-most two digits have special names, requiring some
beyond the simplistic loop shown below. For example, 291 is “two
hundred ninety one”, where 29 is
“twenty nine”. The word for “2” changes, depending on the context.
As a practical matter, you should analyze the number by taking off
three digits at a time, the expression
‘(number % 1000)’ does this. You would then format the three digit
number with words like “million”,
“thousand”, etc.

### Steven F. Lott

Sep 19, 2011, 5:51:24 PM9/19/11

Giving an answer doesn't teach as much as discussing a partial or incomplete answer.

Sent from my iPhone

### mohamed

Sep 20, 2011, 3:57:24 PM9/20/11
to Building Skills Books
but i'm understand this exercise how can translate number like 18 or
39
this code i have writing and i can't complete it

number = 3258
lenOfNumber = len(number)
tc = 0
result = ""
c = 0
while c <= lenOfNumber:

leftN = number1 % 10
if leftN == 1:
result += "One"
elif leftN == 2:
result += "Tow"
elif leftN == 3:
result += "Three"
elif leftN == 4:
result += "Four"
elif leftN == 5:
result += "Five"
if c == 0:
pass
elif c == 1 and leftN == 1: