Military time problem | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Military time problem

First two cases only solve Have you any idea about other three cases. I try this date=input() print(str(int(date[0:2])+12)+date[2:5]) if date[6:8]=="PM" or date[6:8]=="pm" and "00"<=date[0:2]<="11" else print(date[0:5])

12th Apr 2020, 2:32 AM
ƦshrƮth.htm
ƦshrƮth.htm - avatar
2 Respostas
+ 3
if hour=="12" and p_day=="AM": print("00:{}".format(minutes)).
12th Apr 2020, 12:55 PM
CĆ©sar Aguas šŸ‡ØšŸ‡“
CĆ©sar Aguas šŸ‡ØšŸ‡“ - avatar
0
Also there can be problem like, 1:10 instead of 01:10
12th Apr 2020, 4:34 AM
Varun Vaswani
Varun Vaswani - avatar