0
what is wrong with the code ????????
time12 = input().lower() ampm = time12.split(" ") hhmm = ampm[0].split(":") if pm in ampm : hhmm[0] += 12 time24 = ":".join(hhmm[0], hhmm[1] print(time24) else: print(":".join(hhmm[0], hhmm[1])
3 odpowiedzi
+ 3
nazeeba ismail
There are a lot if examples already posted in Q&A regarding this question.
Why don't you research this much discussed oroblem and compare those codes against your concept.
+ 2
nazeeba ismail
Your first error is a missing bracket on line 6.
2nd -> missing bracket on line 9.
3rd -> .join only takes one argument, 2 provided.
I stopped looking after this.
Read your error codes, they are a good guide to helping you
0
I want to find out why it shows syntaxerror