+ 1

Please help me guys!

I'm solving code coach challenge questions and every time when I run my code and see that some of the results are hidden and failed to run so I check my code again and see if there is any error but it's not ,so don't know what causing the issue since the results are hidden ,anyone knows solution to this ?

21st Dec 2019, 8:13 PM
ayushman tiwari
ayushman tiwari - avatar
8 odpowiedzi
+ 5
Some people had problems using ceil() to round off the values. Some people had problems with input and output format of the military time challenge. So it is better to write which challenge you mean and to add your code.
21st Dec 2019, 8:17 PM
Denise Roßberg
Denise Roßberg - avatar
+ 4
Then your code is not working. Of course some results should be hidden otherwise people can just make different if else cases depending on each test case. The problem is definetly in your code.
21st Dec 2019, 8:14 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
The output need to be in this format: XX:XX 1:13 -> 01:13
21st Dec 2019, 8:38 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
I would suggest you carefully read the task description and output requirements, then compare that to what you think your code is trying to achieve.
21st Dec 2019, 9:58 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Guys I have fixed the problems thanks ,it just feel so good to be in such a great community .
22nd Dec 2019, 1:56 PM
ayushman tiwari
ayushman tiwari - avatar
+ 1
Also your 12 => 24 will also cause problems. What happens after 11:59 PM ?
21st Dec 2019, 10:03 PM
Rik Wittkopp
Rik Wittkopp - avatar
0
Militray time :- value = input("").split(" ") formate_in_twentyfour = { '1':13, '2':14, '3':15, '4':16, '5':17, '6':18, '7':19, '8':20, '9':21, '10':22, '11':23, '12':24 } if value[1] == 'AM': print(value[0]) elif value[1] == 'PM': formate=value[0].split(":") print(str(formate_in_twentyfour.get(formate[0])) + ':' + formate[1]) else: print("wrong input")
21st Dec 2019, 8:29 PM
ayushman tiwari
ayushman tiwari - avatar
0
Military output requires format XX:XX, so 1:30 AM should output 01:30
21st Dec 2019, 10:00 PM
Rik Wittkopp
Rik Wittkopp - avatar