+ 2

Find error in the code

Problem: https://www.sololearn.com/coach/64?ref=app Solution code: https://code.sololearn.com/ceY0cQe219Hs/?ref=app I can't find error in the code, it gives correct output for all the strings.

2nd Nov 2020, 7:11 AM
Aanisa Ali
Aanisa Ali - avatar
11 Antworten
2nd Nov 2020, 12:04 PM
Arsenic
Arsenic - avatar
+ 11
It is not converting 10 to "ten"
2nd Nov 2020, 7:12 AM
Arsenic
Arsenic - avatar
+ 8
That's for characters in the input. For conversion the question strictly says " but you decide that for numbers 10 and under you would rather write the word out instead. "
2nd Nov 2020, 7:32 AM
Arsenic
Arsenic - avatar
+ 2
Well it is asking for ten numbers(0-9), that doesn't include 10... Arsenic
2nd Nov 2020, 7:23 AM
Aanisa Ali
Aanisa Ali - avatar
+ 2
The problem includes input from 0 to 10 inclusive. So you it need case 10 also.. (Add key "10" before 0,1) Edit :what not working? Can you post update code?Aanisa Ali
2nd Nov 2020, 10:27 AM
Jayakrishna 🇮🇳
+ 2
Iam not find update in code.. Add "10":"ten" to dictionary as a first value as code given by @Arsenic . It works.. Edit : fine. your welcome @Aanisa Ali
2nd Nov 2020, 12:09 PM
Jayakrishna 🇮🇳
+ 1
2nd Nov 2020, 11:13 AM
Aanisa Ali
Aanisa Ali - avatar
+ 1
It passes 5 tests out of 6 but when I include 10 it passes only 2 tests, can u check it. Jayakrishna🇮🇳
2nd Nov 2020, 12:04 PM
Aanisa Ali
Aanisa Ali - avatar
2nd Nov 2020, 12:07 PM
Aanisa Ali
Aanisa Ali - avatar
+ 1
¿Alguien me puede explicar el error?
3rd Nov 2020, 10:05 PM
Nuria Martin Jimenez
Nuria Martin Jimenez - avatar
0
That's for characters in the input. For conversion the question strictly says " but you decide that for numbers 10 and under you would rather write the word out instead. "
3rd Nov 2020, 10:24 PM
Nuria Martin Jimenez
Nuria Martin Jimenez - avatar