0

NO numerals (test cases 3 & 4 are failing)

#Code Coach #No numerals #Test Cases 3 & 4 are failing #Let me know if there's any wrong in program #Thank you x=input() b=["zero","one","two","three","four","five","six","seven","eight","nine", "ten" ] for i in range(11): if(str(i) in x): y=x.replace(str(i),b[i]) print(y)

24th Apr 2020, 4:53 PM
SATHISH SINGARABOINA
SATHISH SINGARABOINA - avatar
3 Answers
+ 1
You need also to convert 10 to ten (see description).
24th Apr 2020, 5:03 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Did you test your code? You have to make sure that you not convert 10 to onezero.
24th Apr 2020, 5:25 PM
Denise Roßberg
Denise Roßberg - avatar
- 1
I changed. But the result is same
24th Apr 2020, 5:08 PM
SATHISH SINGARABOINA
SATHISH SINGARABOINA - avatar