+ 1
Failed Test 3 In No Numerals Solution For Code Coach
I can't pass because of a failed test in this code coach solution even though my solution is EXACTLY the same as the output. https://code.sololearn.com/cIQu9c3GD0x0/?ref=app
13 Answers
+ 7
Chuks AJ You did a great job aswell, passing 4 out of the 5 tests. Programming is not about learning till you're an expert and you're done. There is always something new to learn. Don't compare yourself to someone else. Instead, compare yourself from yesterday. Today you've learned something new, and your goal is to always do so and apply the things you learned.
+ 5
I have reviewed your code with multiple tests and seems to be working fine.. I would request you to share the link to that specific code coach so i can try it
UPDATE:
I've checked it and seems 10 should also be part of the dictionary
+ 5
Chuks AJ You got it well. Keep up the good work.
My way of learning is pretty simple. I learn from several sources. I try to solve tasks on my own and I persevere until I get it done. In the beginning everything goes slower. Look at time as an investment. With time and practice you get faster and faster.
Code Coach is good for the exercise. Try to solve all the tasks. This catapults you to the next level.
+ 4
0-10, 10 included
+ 4
This will help you:
https://code.sololearn.com/c2R5Ecm8rgo7/?ref=app
+ 2
Chuks AJ try this solution if it works or share the link to the code coach, you'll find the link somewhere from the icon at the top right .
I've added a constraint of 0 >= x <= 10
https://code.sololearn.com/c6S58uU4v7A8/?ref=app
+ 2
Mirielle You're correct. The third test had most likely used the number 10 in the sentence. And your solution to the problem seems to be working great.
+ 2
Mirielle Thanks for your solution which passes all test. I especially liked your use of list comprehension which I need to study more. I abandoned my own solution as there was simply no workaround using the dictionary method "get" which passed the test.
+ 2
JaScript Thanks also for your very elaborate solution with comments. I'm not sure how people write code like this, is it just lots and lots of practice? It made me feel very I adequate and I guess it's back to the books for me. :(
+ 1
pullin I've added 10 as a key to my dictionary but it still doesn't pass that test.
+ 1
During my test, it appears that adding "10" into the dictionary will not work as expected except you provide an extra condition for numbers == 10
The output for 10 with dictionary would be "onezero" and not the expected "ten"
My solution to avoid this problem is to cast every possible digit into an integer, check if they are within the required constraint of
0 >= n <= 10
Then get the value at index using the casted value i.e
dict[index] =..
Seems to be working fine atm
+ 1
Chuks AJ I think the main issue is about understanding the problem which I also couldn't figure out untill the second check. Your code would've work pretty well if you'd know about the test using 10
0
Thank you. Unfortunately, I do not know how to share links to code coach problems (I can't find a link) but the title of the problem is "No Numerals" and is a medium level problem.