+ 1

No numerals - Python (solved)

Can anybody please help with my solution to the no numerals challenge? https://code.sololearn.com/c6y6eu63SHCL/?ref=app I know it's probably not the most elegant solution, but it passes test cases 1, 2 and 5. 3, 4 and 6 are hidden so I don't know whats going wrong, but I can't see any reason it wouldn't work

28th Aug 2021, 11:20 AM
Chris
Chris - avatar
7 Antworten
+ 3
Chris I am mystified also. You code seems to work against all my tests. I didn't want to change your concept because we all think differently, but I don't understand why your code did not work. Dict is a great solution. Well done!
28th Aug 2021, 11:59 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 5
Put 10 & ten at the start of your lists, else the response will be one zero
28th Aug 2021, 11:25 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
💪💪💪💪💪Hit
29th Aug 2021, 4:28 PM
Anko .D.
Anko .D. - avatar
0
That solves test case 3 thank you. But 4 and 6 are still fails apparently. When I run it with my own input it works exactly as expected, even before moving the 10's to the start of both lists... so I'm just not sure what's going wrong in the predetermined test cases
28th Aug 2021, 11:32 AM
Chris
Chris - avatar
0
Chris I will look deeper now
28th Aug 2021, 11:34 AM
Rik Wittkopp
Rik Wittkopp - avatar
0
Rik Wittkopp I've managed to fix it! Don't know what the problem was, but I replaced my two separate lists with a dictionary and it passes all test cases. Seems a bit simpler too! Thanks very much for taking a look with me
28th Aug 2021, 11:56 AM
Chris
Chris - avatar
0
Seems oky
28th Aug 2021, 1:27 PM
Anko .D.
Anko .D. - avatar