what is wrong with the code ???????? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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])

5th Jun 2022, 8:04 AM
nazeeba ismail
3 Respostas
+ 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.
5th Jun 2022, 8:15 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 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
5th Jun 2022, 9:27 AM
Rik Wittkopp
Rik Wittkopp - avatar
0
I want to find out why it shows syntaxerror
5th Jun 2022, 8:31 AM
nazeeba ismail