+1

why this code not check all conditions of military code, coad trial?

when I try this code it is perfect 👌 but...... a = input().split() if a[-1] == 'AM' : x = a[0].split(':') if int(x[0]) == 12 : print('00' + ':' + x[-1]) else : print(a[0]) else : b = a[0].split(':') c = 12 + int(b[0]) d = str(c) + ':' + b[-1] print(d)

1/20/2020 2:12:37 PM

J K Singh

1 Answer

New Answer

+4

12:30 PM = 00:30, not 24:30 4:40 AM = 04:40, not 4:40 "when I try this code it is perfect 👌" = False