+ 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 ?
8 Réponses
+ 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.
+ 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.
+ 2
The output need to be in this format: XX:XX
1:13 -> 01:13
+ 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.
+ 2
Guys I have fixed the problems thanks ,it just feel so good to be in such a great community .
+ 1
Also your 12 => 24 will also cause problems. What happens after 11:59 PM ?
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")
0
Military output requires format XX:XX, so 1:30 AM should output 01:30