0
Can't find my error - Python
I'm trying to solve a challenge. The code should replace digits in a string with respective words, eg. 'there are 5 cups' to 'there are five cups'. It fails one of the tests and I can't figure out why. I know it's a crude code, but I think it should work. https://code.sololearn.com/czOCAxhltvMg/?ref=app
8 Answers
+ 2
Pavel remember 10 should come back as ten not onezero
+ 1
Thanks BroFar, I need to read the instructions properly. Fixed it.
+ 1
Pavel it is not fixed ... please keep trying... you will get it.
+ 1
Pavel look at this link
https://ibb.co/PN26TwK
+ 1
BroFar yeah I fixed it in the challenge but forgot to change one line in the code that I linked to. Now it's ok here as well. I guess I have to work on my punctuality :-)
+ 1
Pavel đđ
0
BroFar I really believe I did. I replace 10 first and then replace 1 and 0 after that, so there should be no problem.