Military time Help! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Military time Help!

What's wrong with my code? https://code.sololearn.com/ctpUInqsV54b/?ref=app

20th Sep 2021, 6:19 PM
Joel Denton
4 Answers
+ 2
Test 4 is somthing like this: 01:21 PM Contrary to example of the problem, the hour in the test inputs is always in duble digits. Your code error occures on line 14. Where key "01" (in list "d") is not found ("1" is). So, to correct your code, you can change list "d", like this: d = { "12":"12", "01":"13", "02":"14", "03":"15", "04":"16", "05":"17", "06":"18", "07":"19", "08":"20", "09":"21", "10":"22", "11":"23", }
20th Sep 2021, 7:57 PM
Arsalan [Inactive]
Arsalan [Inactive] - avatar
0
Isn't it the same question as here? https://www.sololearn.com/Discuss/2886793/?ref=app
20th Sep 2021, 6:33 PM
Lisa
Lisa - avatar
0
Yes! It's the same, but in spanish
20th Sep 2021, 7:01 PM
Joel Denton
0
Thanks Arsalan !! Reviewing My code
20th Sep 2021, 8:04 PM
Joel Denton