+ 2
Does anyone know why it doesn't work? (resolved)
I was trying to solve the military time challenge and I'm able to solve three out of five test cases, but the other two won't work. Does anyone find the mistake? https://www.sololearn.com/coach/70?rel=app time=str(input()).split() if time[1]=="AM": print(time[0]) elif time[1]=="PM": splitTime=time[0].split(":") changedTime=int(splitTime[0])+12 if changedTime >=24: changedTime-=24 print(changedTime, end=":") print(splitTime[1])
6 odpowiedzi
+ 6
Michiel Segers , when you post a new question here, you are asked to use tags to give a keyword or idea what your post is meaning. So if you have a question about summing the numbers of a list in python, you may use these tags:
python - list - sum numbers
With this information in tags, people who are not familira in python, can skip this post. If there is no tag as mentioned, people has to open the post, has to read the text, and than will exit. this doesn't have to be.
In the current post, you only used 'challenge' in tags, which is nit very meaningfull. In this case 'python' would be a helpful.
+ 4
Michiel Segers , please use appropriate tags for programming language. Thanks!
+ 2
For input 12:00 AM, it should return 00:00
And also you should append 0 to single digit hour like
1:00 AM to output 01:00
+ 2
Michiel Segers
Tags in this q/a mean that you added as "challenge" in question tags.
Adding tags which best describe problem will help search quick from search bar in Sololearn.
"challenge" is OK & in addition, like code coach, military, python will also best fits and helps for search i think...
+ 1
Thanks, it works perfectly now. Thank you for the help.
0
Can you please explain what you Mean by the 'appropiate tags'? As far as I know, python doesn't need tags or am I missing something?