0
You write a phrase and include a lot of number characters (0-9), but you decide that for numbers 10 and under you would rather w
s=input() n={0:"zero",1:"one",2:"two",3:"three",4:"for",5:"five",6:"six",7:"seven",8:"eighth",9:"nine"} i=0 s=s.replace("10","ten") while (i<10): s=s.replace(str(i),n[i]) i=i+1 print(s) I don't understand what i write wrong 🤷
3 Respostas
+ 6
4 -> four
8 -> eight
+ 4
Կարեն Բայադյան ,
if you are talking about code coach exercice "no numerals":
the code may work for you, but it does not pass the test cases.
there are several issues that does not create error messages, but they give incorrect results.
giving input like: 'hello 1 5 123', the result will be: 'hello one five onetwothree'. but it should not touch the last number 123.
+ 2
Simba it's work Kimba oh Simba 😉😁 👏