+ 1

#Was trying to make a 24 hour clock convertor but for somereason it fails to pass the "Military Time" challange in sololearn..

i=input() if 'AM' in i: if '12' in i: i=i.replace('12','00') print(i.replace('AM', '')) elif '12' in i: print(i.replace('PM','')) else : i=i.replace('PM', '') i=i.replace(':','.') i=float(i)+12.00 i=str(i) if len(i)==4: i=i+'0' print(i.replace('.',':')) #please help

14th May 2020, 7:19 PM
Leonardo Jk
1 Odpowiedź
+ 2
You need print in 00:00 form. Not dot.. Not single 0 but need 00
14th May 2020, 7:23 PM
Jayakrishna 🇮🇳