+ 1

Seems to be working fine in my computer but not here.

Syntax error. Program:12 hr to 24 hr format https://code.sololearn.com/ciaH18Cbng1a/?ref=app

14th Feb 2020, 11:48 AM
Shahil Magar
Shahil Magar - avatar
8 odpowiedzi
+ 4
You forgot a parenthese in both of the last two print statements.
14th Feb 2020, 12:15 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 3
else: if l[0]=='12': l[0]='00' print (str(l[0])+':'+str(l[1])) if int(l[0])<10 and int(l[0])>0: print ("0"+str(l[0])+str(l[1]))
14th Feb 2020, 12:06 PM
Oma Falk
Oma Falk - avatar
14th Feb 2020, 12:11 PM
Oma Falk
Oma Falk - avatar
+ 1
1. What should the code do? 2. What was the error message?
14th Feb 2020, 12:06 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
you got some probs with brackets.. not that big thing
14th Feb 2020, 12:07 PM
Oma Falk
Oma Falk - avatar
0
Should convert 12 hr time to 24 hr format
14th Feb 2020, 12:08 PM
Shahil Magar
Shahil Magar - avatar
0
Oma Falk i tried still error
14th Feb 2020, 12:08 PM
Shahil Magar
Shahil Magar - avatar
14th Feb 2020, 12:08 PM
Shahil Magar
Shahil Magar - avatar