0

Code Coach (No Numerals)

Why this code not working as expected? https://code.sololearn.com/csHgaCsiRoHu/?ref=app

29th Mar 2020, 12:41 AM
Tzion
Tzion - avatar
6 Antworten
+ 3
replace method returns a copy of the string but it doesn't change it. inp = inp.replace(n,alp[int(n)]) As HonFu said 10 needs to come first in your num list if you want to get 'ten' instead of 'onezero'.
29th Mar 2020, 1:45 AM
Kevin ★
+ 6
Ten missing. Also ten needs to come first.
29th Mar 2020, 12:44 AM
HonFu
HonFu - avatar
+ 4
You forgot the number 10
29th Mar 2020, 1:08 AM
Cmurio
Cmurio - avatar
+ 3
Ah, sorry, missed that part! 😅
29th Mar 2020, 8:08 AM
HonFu
HonFu - avatar
+ 1
Kevin Star Oh Thank you so much , it just return the value as i replace it but didn't store them in variable.Beside that, the 10 issue , by the way , thank you so much
29th Mar 2020, 2:27 AM
Tzion
Tzion - avatar
0
HonFu JECKA1997 i dont get it. what u mean? i failed all the test cases.
29th Mar 2020, 1:19 AM
Tzion
Tzion - avatar