Skip to content

Commit

Permalink
Fix Invalid Output
Browse files Browse the repository at this point in the history
Fix problem with large number without hundred
see akshaynagpal#24
  • Loading branch information
kylosnote authored May 2, 2018
1 parent 068665a commit 22e5744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion word2number/w2n.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def word_to_num(number_sentence):
hundreds = number_formation(clean_numbers[thousand_index+1:])
elif million_index > -1 and million_index != len(clean_numbers)-1 and thousand_index != len(clean_numbers)-1:
hundreds = number_formation(clean_numbers[million_index+1:])
elif billion_index > -1 and billion_index != len(clean_numbers)-1:
elif billion_index > -1 and billion_index != len(clean_numbers)-1 and thousand_index != len(clean_numbers)-1:
hundreds = number_formation(clean_numbers[billion_index+1:])
elif thousand_index == -1 and million_index == -1 and billion_index == -1:
hundreds = number_formation(clean_numbers)
Expand Down

0 comments on commit 22e5744

Please sign in to comment.