(SOLVED) 12-hr to 24-hr Failed two test cases, what can be those two cases | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

(SOLVED) 12-hr to 24-hr Failed two test cases, what can be those two cases

12-hr to 24 hr time conversation program, failed to pass the locked test cases. Any suggestion on this code. https://code.sololearn.com/cIgCZqE3jf9e/?ref=app https://sololearn.com/coach/70/?ref=app

26th Nov 2020, 6:45 AM
Ashok Acharya
Ashok Acharya - avatar
8 Answers
+ 2
remember that 12 PM is 12:00 not 24:00 And 12AM is 00:00 not 12:00
26th Nov 2020, 7:08 AM
Angelo
Angelo - avatar
+ 2
Is it still wrong after implementing both 12pm and 12am?
26th Nov 2020, 7:18 AM
Angelo
Angelo - avatar
+ 1
Angelo Landi doesn't looks like it is! I just updated the code, and tried. still those test failed.
26th Nov 2020, 7:12 AM
Ashok Acharya
Ashok Acharya - avatar
+ 1
Nasif Rahman yes I understand. works well for 05:00 AM, 12:05 PM. Not sure about 00:00! will modify code and test 12:00 AM.
26th Nov 2020, 7:43 AM
Ashok Acharya
Ashok Acharya - avatar
+ 1
Angelo Landi I haven't tried for 12 am. I will try and notify.
26th Nov 2020, 7:44 AM
Ashok Acharya
Ashok Acharya - avatar
+ 1
Angelo Landi yes I updated for both. and still failed!
26th Nov 2020, 7:55 AM
Ashok Acharya
Ashok Acharya - avatar
+ 1
Hint from Nasif Rahman is the solution for those two cases ! thanks !
26th Nov 2020, 8:14 AM
Ashok Acharya
Ashok Acharya - avatar
+ 1
Thanks everyone for constructive comments!
26th Nov 2020, 8:15 AM
Ashok Acharya
Ashok Acharya - avatar